Html sidebar question

okay SO I’m trying to make THIS CODE so it has a transparent background but as of right now im stuck with trying to make that happen! please help! :slight_smile:

<!—SideBar—>

<!-- IE in quirks mode -->
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0//EN”>
<title>Fixed left-sidebar</title>
<style type=“text/css”>
body{
margin:0;
padding:0 0 0 <length>;
}
div#left-sidebar{
position:absolute;
top:0;
left:150;
width:<length>;
height:100%;

}
@media screen{
body>div#left-sidebar{
position:fixed;
}
}

  • html body{
    overflow:hidden;
    }
  • html div#content{
    height:100%;
    overflow:auto;
    }
    </style>
    <div id=“left-sidebar”> <center> <font color="#FFFFFF"> SHIT GOES HERE</font> </center> </div>
    <div id=“content”> </div>

Your code is a mess. :smiley:

You’re missing CSS with inline code. Never a good idea. Makes it very difficult to review.

You should float your sidebar to the left rather than an absolute position.

Is this what you really what to do?

http://css-tricks.com/examples/SuperSimpleTwoColumn/

Since you haven’t defined your background, the background defaults to whatever the browser decides to show.

You haven’t defined a background (at least, not in the sample you’ve given us) so the background is whatever the browser’s default background is. (Generally: white. But don’t assume it’s white.)

Also I agree: don’t mix up CSS styles and inline styles/tags that were superseded with CSS. It’s probably a bad idea to have both CSS and a <CENTER> tag in the same page-- it’s one of those “it’ll probably work but…” kind of situations.

What does “width: <length>;” mean?