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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Background Image (y-repeat & height) in Content Area NOT COOPORATING WITH DIV

    <url removed, see excellent help below for simple solution>

    It seems that at line 23 in my code, I have to DEFINE the height in order for my background to stick to the contents. There is a content div that holds both the left and right divs. I can't figure out how to get this background to stick to whatever size the contents are. Any help is very appreciated on this Valentines day. PLEASE HAVE A HEART AND HELP ME!
    Last edited by _yo_wasup_; 02-14-2011 at 04:27 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello _yo_wasup_,
    Since the contents of #content are floated they need cleared. Try clearing them like this -
    Code:
    #content {
    	width:717px;
    overflow: auto;
    	background-image:url(images/content_bg.png);
    }

    See how overflow: auto; works to clear your floats.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    _yo_wasup_ (02-14-2011)

  • #3
    New Coder
    Join Date
    Aug 2006
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello _yo_wasup_,
    Since the contents of #content are floated they need cleared. Try clearing them like this -
    Code:
    #content {
    	width:717px;
    overflow: auto;
    	background-image:url(images/content_bg.png);
    }

    See how overflow: auto; works to clear your floats.
    EXCELLENT, thank you very much! I had tried doing clear:both;, but had not tried overflow:auto;. Thank you for the nice Valentines day gift-- your exceptional support!

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by _yo_wasup_ View Post
    EXCELLENT, thank you very much! I had tried doing clear:both;, but had not tried overflow:auto;. Thank you for the nice Valentines day gift-- your exceptional support!
    clear: both; would only work if you had a third element inside #container, after the floated columns that was not floated. Like a footer or something. Applying clear: both; to #content itself would not affect it's contents.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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