Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Rick Lecoat
On 24 Sep 2012, at 12:50, Philippe Wittenbergh wrote: > You didn't account for the default margin-left on the DD (which in most > browsers nowadays is equal to 40px). > Add > dd { margin: 0; } > and your floated blocks will align. Philippe; You’re right, I didn’t account for that on the sampl

Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Rick Lecoat
On 24 Sep 2012, at 12:01, Gabriele Romanato wrote: > Hi, > There's simple solution to set up a dl with such styles: > > Dt { > float: left; > clear: left; > width: xx; > } > > Dd { > Margin-left: xx; > } Thanks very much for that, Gabriele. It works perfectly -- at least it does in the si

Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Georg
On 24.09.2012 12:55, Rick Lecoat wrote: http://www.helpme.sharkattack.co.uk/opposingfloats.html As you can see, the dd is dropping below the dt’s generated box -- I was expecting them to both sit at the same vertical position. There’s plenty of horizontal space between them and no margins or p

Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Philippe Wittenbergh
Le 24 sept. 2012 à 19:55, Rick Lecoat a écrit : > I think I’m missing something very obvious in a ‘wood-for-the-trees’ kind of > way here, but I’m trying to set up a definition list so that the dt and dd > elements are floated opposite each other. I’ve made a simplified page with > just the l

Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Barney Carroll
Hi Rick, You can ensure the last element on a row of floats occupies whatever space remains (and no more) by removing its float declaration and setting its overflow property to hidden. Then you can assure the dts start a new line by giving them clear: both. See below for my attempted fix: http:/

Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Philip TAYLOR
Gabriele Romanato wrote: Hi, There's simple solution to set up a dl with such styles: Dt { float: left; clear: left; width: xx; } Dd { Margin-left: xx; } What if you don't know xx, Gabriele, and want the browser to compute it for itself, based on the width of the widest plus a

Re: [css-d] Opposing floats not lining up

2012-09-24 Thread Gabriele Romanato
Hi, There's simple solution to set up a dl with such styles: Dt { float: left; clear: left; width: xx; } Dd { Margin-left: xx; } Another solution is to use relative positioning only, but the final result is not so simple to achieve in all browsers. HTH. Gabriele Romanato ___

[css-d] Opposing floats not lining up

2012-09-24 Thread Rick Lecoat
I think I’m missing something very obvious in a ‘wood-for-the-trees’ kind of way here, but I’m trying to set up a definition list so that the dt and dd elements are floated opposite each other. I’ve made a simplified page with just the list on: http://www.helpme.sharkattack.co.uk/opposingfloats