penders

msg:4332084 | 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?
|
jonasisme

msg:4332113 | 3:09 pm on Jun 28, 2011 (gmt 0) |
Hey thanks for the reply! Check the image below [img683.imageshack.us...] this is the structure: <dl> <dt>an option</dt> <dd>input</dd> <dd>description of an option</dd> ....above repeated few times with different input fields.... <dt> </dt> <dd>submit button ish ere </dd> <dd> </dd> </dl> 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? Thanks
|
penders

msg:4332138 | 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! :)
|
jonasisme

msg:4332177 | 5:50 pm on Jun 28, 2011 (gmt 0) |
Haha, yes indeed! Thanks! Solved!
|
rocknbil

msg:4332591 | 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.
|
penders

msg:4333210 | 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.
|
lucy24

msg:4333253 | 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?
|
penders

msg:4333325 | 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: <dl> <dt><dd><dd> <dt><dd><dd> </dl> ...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?
|
alt131

msg:4333371 | 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?
|
|