Div width and float

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have this structure:

<div id="wrapper">
   <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
float right.
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

8.6.2011 8:13, Luciano (DOC) wrote:

Quoted text here. Click to load it

Post to the right group (comp.infosystems.www.authoring.stylesheets when
you have a CSS problem), and include the URL of the page.

Yucca, http://www.cs.tut.fi/~jkorpela /

Re: Div width and float

Quoted text here. Click to load it

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.

Quoted text here. Click to load it
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>


Site Timeline