www.webdeveloper.com
Results 1 to 5 of 5

Thread: Background image hiding other element's background colors

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    Egypt
    Posts
    65

    Background image hiding other element's background colors

    Hello,
    The CSS of the body's background making the #id not show, when I remove the body's background attribute it shows normally
    Code:
    body{
    background: url('images/bg.jpg') top left repeat fixed #000;
    }
    #id {
    background-color: blue;
    ... other attributes
    }
    Any help?

  2. #2
    Join Date
    Mar 2012
    Location
    Saint-Petersburg, Russia
    Posts
    97
    google did not tell you about style "z-index: -100"?

  3. #3
    Join Date
    Mar 2007
    Location
    Egypt
    Posts
    65
    Quote Originally Posted by RodionGork View Post
    google did not tell you about style "z-index: -100"?
    I already tried that .. -1
    Didn't work

  4. #4
    Join Date
    May 2011
    Posts
    52
    Try this

    Code:
    body {
    background-color: #000;
    background-image: url('images/bg.jpg');
    background-repeat:repeat;
    left: 0;
    position: fixed;
    top: 0;
    z-index:1;
    }
    
    #id {
    background-color: blue;
    z-index: 10;
    That might work. I don't know.

  5. #5
    Join Date
    Mar 2007
    Location
    Egypt
    Posts
    65
    Well damndaewoo, I tried that also but in vain.

    I found a temporary solution which is
    Code:
    body{
    background: url('images/bg.jpg') top left repeat fixed #000;
    }
    #id {
    background: none #000;
    }
    But I'll have to do this to any element I assign a background value to, and it gets ugly sometimes..
    Last edited by ShaReB; 04-05-2012 at 05:12 PM. Reason: Forgot to mention something

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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