SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist IJoeR's Avatar
    Join Date
    Feb 2003
    Location
    Somewhere in, MD
    Posts
    400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DIV within a DIV with a background image problem.

    This is such a lame thing I can't comprehend why in the world simple coding things like this don't work.

    So I have some code like this:

    <div id="1">
    <div id="2">
    <div id="3">
    Some HTML code goes here.
    </div>
    </div>
    </div>

    My CSS code is something like

    #1 { width:100&#37;; text-align:center; }
    #2 { width:750px; margin-left:auto; margin-right:auto;}
    #3 { background-image: url(mybackground.jpg); background-repeat: vertical-x; }

    So all of this works in IE 7, but the background image doesn't show up in Firefox for PC, Safari - MAC, Firefox MAC...

    Why doesn't the background image display -- this should be something that just works -- there isn't anything crazy there.

    Let me know your thoughts.
    Last edited by IJoeR; Dec 15, 2006 at 12:53. Reason: i accidentally hit submit.

  2. #2
    SitePoint Addict buildakicker's Avatar
    Join Date
    Jun 2005
    Location
    NorCal
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I haven't used the Verticle:X function...

    Try this:

    Code:
    	background-image: url(images.gif);
    	background-repeat: repeat-x;
    	background-position: left top;
    SKILEASES.COM - FREE rental listings!
    WILDFIREBLOG.COM - Wildland Fire microblog!

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,490
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    There is no such thing as vertical-x

    Its repeat-x or repeat-y or repeat.

    Use shorthand and it save a load of code:

    Code:
    background: url(images.gif) repeat-x left top;


    ()BTW you can't start id's with a number either even though i know that it was only for example )


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
  •