SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I cant get this background to show up.

    It does show up in IE....but thats it.

    heres the code:
    HTML Code:
    <div style="background:url('https://www.kranichs.com/images/kran_top_banner.jpg') top no-repeat; width:800px;">      
        <div style="float:left">
            <a href="http://www.kranichs.com/"><img src="https://www.kranichs.com/images/kran_logo.jpg" /></a>
        </div>
        <div id="nav_search" style="float:right; margin-top:10px;">
            <div style="text-align:right">
                <span style="font-family:Arial, Helvetica, sans-serif; font-size:9px; color:#999999">
                    <span style="color:#f00; margin-right:20px;" >Free Shipping &amp; Gift Wrapping!</span>
                    You are not logged in.
                </span>&nbsp;
            </div>
        </div>
    </div>
    I cant see what I am doing wrong?

    Thanks
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  2. #2
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add overflow: hidden; to keep your floats inside the outer div.
    Code:
    <div style="background:url('https://www.kranichs.com/images/kran_top_banner.jpg') top no-repeat; width:800px;overflow: hidden;">      
        <div style="float:left">
            <a href="http://www.kranichs.com/"><img src="https://www.kranichs.com/images/kran_logo.jpg" /></a>
        </div>
        <div id="nav_search" style="float:right; margin-top:10px;">
            <div style="text-align:right">
                <span style="font-family:Arial, Helvetica, sans-serif; font-size:9px; color:#999999">
                    <span style="color:#f00; margin-right:20px;" >Free Shipping &amp; Gift Wrapping!</span>
                    You are not logged in.
                </span>&nbsp;
            </div>
        </div>
    </div>

  3. #3
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fredda View Post
    Add overflow: hidden; to keep your floats inside the outer div.
    Code:
    <div style="background:url('https://www.kranichs.com/images/kran_top_banner.jpg') top no-repeat; width:800px;overflow: hidden;">      
        <div style="float:left">
            <a href="http://www.kranichs.com/"><img src="https://www.kranichs.com/images/kran_logo.jpg" /></a>
        </div>
        <div id="nav_search" style="float:right; margin-top:10px;">
            <div style="text-align:right">
                <span style="font-family:Arial, Helvetica, sans-serif; font-size:9px; color:#999999">
                    <span style="color:#f00; margin-right:20px;" >Free Shipping &amp; Gift Wrapping!</span>
                    You are not logged in.
                </span>&nbsp;
            </div>
        </div>
    </div>
    Why overflow: hidden?

  4. #4
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mr Jojo View Post
    Why overflow: hidden?
    http://reference.sitepoint.com/css/floatclear

  5. #5
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, OK if I add overlow:hidden; it does make the background show up, but the drop down menu is also within the same div...which is then caused to not show up.

    Can anyone recommend the best remedy?

    Thanks!!
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  6. #6
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok I guess that was a stupid question...I just took the drop down outside the div and that took care of it.
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.


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
  •