CSS question -
StrickenKid - 12.09.2009
Ok, i'm making a web page, and i have a sidebar for the navigation, a header and a footer, now i want the sidebar to fit inside the header and footer flush no matter how the height of the page.
Here is what the page looks like:
I'm not very good with css so I thought id ask
Thanks for any help.
Re: CSS question -
iLinx - 12.09.2009
you need to float the sidebar and the container for the main content,
if i was doing this i would wrap every element,
the header, footer and main area which would hold the sidebar and content
but it can probably be done without it
Re: CSS question -
StrickenKid - 12.09.2009
I'm sorry but what do you mean?
I'm not that good with css :S
Re: CSS question -
iLinx - 12.09.2009
in css theres a function called float.
it can be used to float an object right or left, and this is the easiest way to organize and make menus, layouts , etc in css today.
a wrapper is basically a div tag that has a declared width or height, you place stuff inside it, the idea of it is to organize whats going on.
for example if you have a 800px wrapper and you want to put a sidebar and a content container inside,
you could make a 300px sidebar and a 500px container.
if you float the sidebar to the left and the 500px container to the right inside the wrapper, the total width of the 2 elements will be 800px, they will be sideby side, one on the left and the other on the right. This ensures that text doesnt randomly go out, etc, etc.
you can also use it for headers, footers, really whatever you want its usually good to float and wrap it in something, i think thats one of the first things you learn by experience when you start out with css
Re: CSS question -
StrickenKid - 12.09.2009
Could I have an example of what your talking about so I understand it more?
Re: CSS question -
iLinx - 12.09.2009
Yea,
heres a working example i made for you,
its nothing extra ordinary, but it should help you understand alil better.
Download .rar
Re: CSS question -
StrickenKid - 12.09.2009
Alright, yes that's how my page is made, now the problem is that sidebar, just like in your example, doesn't go to the bottom of the main content, that's my problem.
Re: CSS question -
mamorunl - 12.09.2009
so basicly what you want is that the SIDEBAR is the same height as CONTENT?
Re: CSS question -
StrickenKid - 13.09.2009
YES!
lol finally someone understands.
Re: CSS question -
mamorunl - 13.09.2009
yea,, too bad that I am having the same problem xD