Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Div width and float
- Luciano (DOC)
June 8, 2011, 5:13 am
rate this thread
<div id = "col1">
<div id = "col2">
<div id = "col3">
Each div has a fixed size in pixel and div columnns 1 and 2 float left, 3
The problem is if I put a div into the col1 I want it to expand up to col1
size, but it expands up to wrapper size and col2 moves after it on the next
Can anybody help me?
Re: Div width and float
About your HTML, best to close your elements. It's a good idea to
do so, especially in usenet posts to give more immediate
recognition of what you are wanting.
In other words not all the divs have a fixed size.
How about more carefully laying out what you have tried, with the
actual px you want assigned etc. Nothing as good as a URL. Second
best would be the complete HTML and its CSS. And, as JK says, I
guess, post to comp.infosystems.www.authoring.stylesheets while
you are at it as it is likely a CSS problem.
A div is width: auto by default, and so, within a fixed size col,
will expand to fill that col unless you are doing something to
stop it. If you give a url or the full and validated HTML and
CSS, you are likely to get help there. Hang on, I am rushing over
there right now in anticipation. <g>