Ready to get started?Download WordPress


[resolved] DIVs - CSS color not working? (2 posts)

  1. Konzine
    Posted 3 years ago #

    Hello! I am having a bit of issue with my current coding.

    I am attempting to change the entire color of my "wrapper" DIV. Unfortunately, it doesn't seem to be working no matter what I do with the code.

    Here is the file code;

    		<div id="wrapper">
    			<div id="header">
    				<a href="<?php bloginfo('url'); ?>"><img height="28" src="images/index_03.gif" width="128"></a>
    					<div id="searchform">
    						<?php include(TEMPLATEPATH . '/searchform.php'); ?>
    			<div id="container">
    				<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    				<?php endwhile; ?>
    				<?php else : ?>
    				<?php endif; ?>
    			<div id="footer">

    And here is the CSS code;

    #wrapper {
      width: 1000px ;
      margin-left: auto ;
      margin-right: auto ;
      color: black ;
    #header {
      width: 1000px ;
      float: left ;
      border-bottom: 2px solid #5F5F5F;
      margin: 10px 0 0 0;
    #searchform {
      float: right ;

    It should be noted that I have tried using Background-color and Background-image with no success. Thanks!

  2. Konzine
    Posted 3 years ago #

    I am a big dummy! I found the error to be with the children divs.

    For anyone else who has this issue, the resulting code for your css;

    #wrapper {
      width: 1000px ;
      clear: both ;
      margin-left: auto ;
      margin-right: auto ;
      background-color: black ;
      overflow: hidden ;

Topic Closed

This topic has been closed to new replies.

About this Topic