| 1:55 pm on Jun 28, 2011 (gmt 0)|
|... it should be in the first DD on the next line.. |
Where is the submit button in your markup?
I think you might need to post some of your markup?
| 3:09 pm on Jun 28, 2011 (gmt 0)|
Hey thanks for the reply!
Check the image below
this is the structure:
<dd>description of an option</dd>
....above repeated few times with different input fields....
<dd>submit button ish ere </dd>
But as the text area input its height is bigger then the description its height.. the floating dt comes on the same line instead of on the next line.. check the image!
An solution would be defining special classes for text area that give the last id an height... but you might have another solution?
| 4:08 pm on Jun 28, 2011 (gmt 0)|
Are you clearing your DTs? Presumably each DT/DD/DD group should appear on one line. eg...
...and welcome to WebmasterWorld! :)
| 5:50 pm on Jun 28, 2011 (gmt 0)|
Haha, yes indeed!
| 4:10 pm on Jun 29, 2011 (gmt 0)|
Another good way to do this is the "shrink wrap" approach. It relies on the basic fact that a floated container will contain any children floated within it. So if you float everything left (or right,) float the parent container too. This is useful if you want to cut down on the number of clearing elements you need in your markup - most clearing elements are empty junk with no inherent semantic meaning.
| 6:41 pm on Jun 30, 2011 (gmt 0)|
|It relies on the basic fact that a floated container will contain any children floated within it. |
Presumably this is the same principle that a parent container with overflow:hidden will also contain floated children?
Although I think @jonasisme is a bit stuck if using a DL. A parent container around each (DT DD DD) block would certainly invalidate the HTML.
| 7:51 pm on Jun 30, 2011 (gmt 0)|
|A parent container around each (DT DD DD) block would certainly invalidate the HTML. |
Isn't the <dl> itself the parent?
| 10:42 pm on Jun 30, 2011 (gmt 0)|
Yes the <dl> is the parent. But the way the design is structured with the <dt><dd><dd> always in a row, like so:
...kind of warrants some kind of additional container around each <dt><dd><dd> block in order to apply rocknbil's "shrink wrap" approach. Since the initial problem seemed to be that the <dt> wasn't clearing the preceeding <dd>. But such a container would obviously be invalid. So I was really questioning whether you could even apply the "shrink wrap" approach to such a structure? May be the <dl> element is the wrong tool to begin with?
| 12:30 am on Jul 1, 2011 (gmt 0)|
@jonasisme and welcome to [webmasterworld.com] :)
@penders, yes the "shrink wrap" technique will work using the dl as the "container".
However, I agree there could well be problems achieving the desired layout using floats - difficult to tell as we don't have the css. ... were you thinking that a form is usually the best tool for a form?