a piece of the CSS:
#content { overflow: hidden; background: #fff; width: 950px; padding: 15px; margin-top: 25px;}
#right_content{ width: 600px; float: right;}
#left_content { width: 200px; float: left; }
oh yeah and I widgetized the left_content,
here is the html:
<div id="left_content">
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('news')) : ?>
<?php endif; ?>
</div>
Also the background to the “content” div is as wide as the div but the height is killing me. I don’t understand why the height of the div doesn’t expand to the end of all content…
You don’t have any content in that div — hence nothing shows on the page. Try putting a height and border in the CSS — and it shows up.
#sidebar {
border: medium solid red;
float: left;
height: 500px;
padding: 0 10px;
text-align: left;
width: 250px;
}
HTML elements only have the height of the content inside them — or if you set the height to something.
Also the background to the “content” div is as wide as the div but the height is killing me. I don’t understand why the height of the div doesn’t expand to the end of all content…
That’s because the only content inside the content div (right-content div) is floated — and floated elements are taken out of the normal flow of elements on the page. So the content div is functionally empty — hence it does not go to below the right content div. You can force it to do so by putting something below the right-content div but still inside the content div — like a period that is the same color as the div background — so it’s invisible but does what you want.
on the news page I actually do have another column.
As I said before I have a “left_column” div to replace the sidebar.
I posted part of the html to the news template…
Used float: left; for that specific div.
here is the CSS for the content (container) and the two divs I’d like to float…
#content { background: #fff; width: 950px; padding: 15px; margin-top: 25px;}
#right_content{ width: 600px; float: right;}
#left_content { width: 200px; float: left; }
and i tried to fix the errors i switched ul id=”nav” to ul class=”nav”
but now the whole style for the ul list doesn’t even work -_-
but if I delete class=”nav” on all 4 sections of the navigation and delete .nav from the stylesheet it ends up working…why is that?
the reason I want the ul list to have an id or class is to seperate the top nav from any other ul lists