Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    2
    Thanked 0 Times in 0 Posts

    background not repeating in firefox

    #contentbegin{
    margin: 0 auto;
    width: 850px;
    background: #fff url(images/contentbg.gif);
    height: auto;
    }
    #contentbody{
    float: left;
    position: relative;
    top: -50px;
    width: 550px;
    text-align: left;
    margin-left: 20px;
    }

    <div id="contentbegin">
    <div id="contentbody">
    <p>Blah</p>
    <p>Blah</p>
    </div>
    </div>

    It works in IE but having it work in IE doesnt mean jack. I tried using overflow: hidden but then i lost the top: -50px from #contentbody - any assistance will be great. thanks in advance

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to clear your floats.
    http://positioniseverything.net/easyclearing.html
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder QBall777's Avatar
    Join Date
    Mar 2005
    Location
    uk
    Posts
    156
    Thanks
    5
    Thanked 1 Time in 1 Post
    Hi

    Remove float: left;

    i.e.

    #contentbody{
    position: relative;
    top: -50px;
    width: 550px;
    text-align: left;
    margin-left: 20px;
    }

    Then it repeats or

    #clear{
    clear: both;
    }



    <div id="clear"></div>
    Last edited by QBall777; 02-13-2008 at 10:26 PM.


  •  

    Posting Permissions

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