SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Any ideas for a solid double background that is cross compatible?

  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Any ideas for a solid double background that is cross compatible?

    I’m trying to build a background on my website and I am having trouble with the way I have the CSS set up. You can see what I have built so far here.

    http://www.webskillsplus.com/packwood/index.php

    Take a look at the attached image and you can see what I am trying to accomplish. I would like a red bar to run horizontally behind the page.

    I tried messing with the z index with an absolute position but I couldn’t get it to work.

    I tried doing the following and it isn’t working either.

    Code:
    html {
    	background: #ccc url(../img/dice_slice.jpg);
    	background-repeat: repeat-y;
    }
    body {
    	margin: 0;
    	background-color: #b87431;
    	background-image: url(../img/massageservices.jpg);
    	background-position:center;
    	background-repeat: no-repeat;
    }
    Anyone have any ideas? Thanks in advance for your help.
    Attached Images

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I can't see hte image yet (could you just upload it, for example, on tinypic.com, and paste hte link here?), but it seems you already have a red bar running horizontally through the page?
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi RyanReese. Thanks for responding. Okay, you can see the image here . I do have the red bar going across but you will see in the image I am trying to get a repeat-y background going behind it. I am not sure how to make it work. Thanks for any help.

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    If you want the images to extend however far the content is, you can't use HTMl/Body for the images.

    You need to (for full support) make another wrapping element. On that wrapping element, put the yellowish repeating-y image. On your inner wrapping element (the one you currently have now), put the red strip, and position accordingly.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  5. #5
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Ryan's on the right track, and if you put the div for that second background first in your markup -- as a empty DIV, absolute position it, then set position:relative on the outer wrapper for your content, you won't need to set z-index, it should depth sort over it automatically. If that red box is going to be at a fixed height, you could even skip absolute positioning and simply set it's height, set the tiled image to the bottom of the div, and then negative-margin that height away.

Bookmarks

Posting Permissions

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