HTML/CSS question : correction
Greg Rundlett
greg at freephile.com
Tue Jul 1 14:05:18 EDT 2003
The only way I could get the DT to line up with the DD when the DD
spanned multiple lines, was to insert a <br /> tag between DT DD pairs.
<head>
<style>
dl {
border:solid 1px red;
display:block;
width:400px;
float:left;
padding:0px;
margin:0px;
}
dt {
border:dashed 1px black;
display:block;
width:100px;
float:left;
padding:3px;
margin:0px;
text-align:bottom;
}
dd {
border:dotted 1px green;
display:block;
width:200px;
float:right;
padding:3px;
margin:0px;
}
</style>
</head>
<body>
<dl>
<dt>Apple</dt>
<dd>A flavorful fruit grown on trees. A flavorful fruit grown on
trees. A flavorful fruit grown on trees. A flavorful fruit grown on
trees. A flavorful fruit grown on trees. A flavorful fruit grown on
trees. A flavorful fruit grown on trees. A flavorful fruit grown on
trees. A flavorful fruit grown on trees. A flavorful fruit grown on
trees. A flavorful fruit grown on trees. </dd>
<br />
<dt>Grape</dt>
<dd>What wine is made from. What wine is made from. What wine is
made from. What wine is made from. What wine is made from. What wine
is made from. What wine is made from. What wine is made from. What
wine is made from. What wine is made from. </dd>
<br />
<dt>Orange</dt>
<dd>Acidic fruit used in juice making. Acidic fruit used in juice
making. Acidic fruit used in juice making. Acidic fruit used in juice
making. Acidic fruit used in juice making. Acidic fruit used in juice
making. </dd>
</dl>
</body>
</html>
More information about the gnhlug-discuss
mailing list