Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jan 2008
    Posts
    5
    Member #
    16382
    I'm having a problem with putting a background behind two divs that are next to each other...
    I have a main content div on the left and a sidebar div on the right that are enclosed in a page div. I made the background of the page div black. But when i float them both to the left, to put them next to each other, the black background extends only as far as the sidebar div extends. It would be awesome if it extended to the one that is longest automatically, but if not, then extend past the content div.
    Anyone know how to fix this?
    Thanks.

    I attached the html and css file.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    Just give us the link to your site because something is wrong with the .css attachment.
    It's easier if we don't have to duplicate it on our PC's ... takes too long to do.


  4. #3
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    With floats, add a clearing div below the the 2 floats. A footer works well for this if you don't already have one. Also you can try overflow: auto; for the page div.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:48 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com