www.webdeveloper.com
Results 1 to 3 of 3

Thread: HTML and transparent setting for background images

  1. #1
    Join Date
    Sep 2005
    Posts
    1,634

    HTML and transparent setting for background images

    I have set HTML at the top like:
    PHP Code:

    html
    bodydiv {
     
    backgroundnone repeat scroll 0 0 transparent;
    }
    htmlbody {
     
    background#FCCCDD url(../images/background1.jpg) no-repeat center 250px transparent;

    What are influences of transparent as it seems that transparent inside html, body will demand setting transparent to see #FCCCDD even there is demanded background: none repeat scroll 0 0 transparent;

    What is priority for this settings?
    Example:
    1. removing transparent inside html, body {
    will create not transparent setting and seen #FCCCDD
    2. keeping transparent setting will act as transparent and remove #FCCCDD

    Need help.

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,132
    I'm not sure what you're trying to achieve here. You can't have both a #FCCCDD background and transparent at the same time. Transparent is defined in the "background-color" property. You're using 6 variables in the background shorthand where it only allows for 5. Here's some more info on shorthand:
    http://www.w3schools.com/css/css_background.asp
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Nov 2013
    Location
    new york
    Posts
    68
    Quote Originally Posted by toplisek View Post
    I have set HTML at the top like:
    PHP Code:

    html
    bodydiv {
     
    backgroundnone repeat scroll 0 0 transparent;
    }
    htmlbody {
     
    background#FCCCDD url(../images/background1.jpg) no-repeat center 250px transparent;

    What are influences of transparent as it seems that transparent inside html, body will demand setting transparent to see #FCCCDD even there is demanded background: none repeat scroll 0 0 transparent;

    What is priority for this settings?
    Example:
    1. removing transparent inside html, body {
    will create not transparent setting and seen #FCCCDD
    2. keeping transparent setting will act as transparent and remove #FCCCDD

    Need help.
    You can try with png image. Just design a transparent image in photshop. Take one pixel size. Make sure the opacity of the pic will be below 60 percent. Then save it as 'save for web' as png image. Then apply it as background. like this.
    .demclass { background: url('bgtransparant.png') left top repeat; }

    It works fine.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles