Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS change color between two divs?? easy

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30563
    mikeman
    Member

    Hi, im trying to change the color between the #maincontent and #sidebar, which is currently white, i want to make it black, but not change the background of the entire site to black?
    any idea?
    http://ocixx.com/test/testing.html
    thank you

    #77925
    TheDoc
    Member

    Add the following to your CSS file:

    #contentwrapper { background: #000; }

    .clear { clear: both; }

    And just before the #contentwrapper div closes, add:

    #77927
    TheDoc
    Member

    No problem, Mike. You just have a bit of a problem with how your divs are being closed.

    It currently looks like:



    But should actually be:



    #77929
    TheDoc
    Member

    @wolfcry911 I’ve been using it for so long I haven’t bothered to look at alternatives.

    #77934
    jamygolden
    Member

    @wolfcry911 I still use <div class=”clear”></div> too. I came across an IE6 and 7 problem while using the .clearfix method – It wasn’t consistently not misbehaving. I’d use .clearfix for my personal projects, but I’d definitely rely on the older method for solid compatibility.

    Also, <br class=”clear” /> has given me a problem or two within IE6 and 7 before. But again, not consistently.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.