On Fri, Oct 15, 2010 at 12:31 PM, David McGlone <[email protected]> wrote:
> Hi everyone.
> I've been trying to create a very very simple style sheet and for some
> reason it's not working. I'm so frustrated to the point I'm almost P'd
> off.
>
> The problem is I have a wrapper, a left menu, body and a footer. I'm
> trying to get the body to float next to the left menu, but every time I
> add a float to any of the elements, they move outside the "wrapper".
> What don't I understand here? here's the code:
>
> BODY {
> font-family: helvetica;
> font-size: 100%;
> }
>
> #wrapper {
> width: 980px;
> border: 1px dashed #ff0000;
> margin: 0 auto 0 auto;
>
> }
>
> #left-nav {
> width: 180px;
> border: 1px dotted;
>
> }
>
> #main_body {
> width: 200px;
> border: 1px solid #ff0000;
>
> }
>
> #footer {
> width: 900px;
> border: 3px dashed;
> }
Hello David,
I might not be understanding your goals but try the following changes:
#left-nav {
width: 180px;
border: 1px dotted;
float: left; /* add float here */
}
#main_body {
width: 200px;
border: 1px solid #ff0000;
float: left; /* add float here */
}
#footer {
clear: left; /* add clear here */
width: 900px;
border: 3px dashed $ff0000;
}
In order to "see" what this looks like try stuffing some content into
the elements.
I use http://www.lorem-ipsum.info/_latin as my favorite gibberish generator.
Regards,
Claude Needham
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/