Forum Moderators: not2easy
<TD>
<DL>
<DT>"Blah blah blah."</DT>
<DD><B>--Author name</B></DD>
</DL>
</TD>
The problem is that there's a vertical space after the Author's name -- as though I had a <P> after the name. But there's no <P> there at all, is there? No, there's not, have a look, no <P>.
I tried to fix this with:
DD { margin-left:10px; margin-bottom:0px; padding-bottom:0px;}
DL { margin-bottom:0px padding-bottom:0px;}
...which did nothing. I added "border-bottom:1px solid red" to the DD and DL definitions, and that showed that each element ends BEFORE the extra space. Why is that extra space there and how can I get rid of it?
I suppose I can get the effect I want by using <P>'s and <BR>'s instead of Terms & Definitions, and then just use a transparent GIF to indent the Author's Name line, but that seems soooo 90's.
Thanks for your help.
As for your problem, however, why not use <p> and <br> tags, as you said, but use the style attribute text-indent: Xpx; in a class or id for the <p> tag containing the Author's Name, as opposed to a transparent gif?
css:
.indent {
text-indent: 15px;
}
html:
<p class="indent">Author's Name</p>
Definition Lists and Semantics [webmasterworld.com]
DL { margin-bottom:0px padding-bottom:0px;}
there is a typo in there ;)
missing semi-colon after margin-bottom's rule..
That should fix the default margin on the <dl>
createErrorMsg it's a type of list element
Definition List [w3.org]
<dl> - definition list
<dt> - definition title
<dd> - definition data
Suzy
(2) I can't believe you all are hassling me because I'm using DD tags for text that isn't a definition! Since when did the semantic meaning of the tags become important? My readers don't determine what kind of content I'm presenting by looking at my source code and seeing which tags I use, they figure out what I'm offering by looking at the actual outputted page. Just because it's *called* a definition tag doesn't mean it has to be used that way. Is every instance of <P> a paragraph in the traditional sense of the word (i.e., a collected of related sentences)? I don't think so.
(3) The missing semicolon was the problem. Duh. I can't believe I wasted bandwidth on WebmasterWorld for that. I will help five other people as my penance.
(1) The <q> tag is useless because it doesn't format the text.
(2) I can't believe you all are hassling me because I'm using DD tags for text that isn't a definition! Since when did the semantic meaning of the tags become important? My readers don't determine what kind of content I'm presenting by looking at my source code and seeing which tags I use, they figure out what I'm offering by looking at the actual outputted page. Just because it's *called* a definition tag doesn't mean it has to be used that way. Is every instance of <P> a paragraph in the traditional sense of the word (i.e., a collected of related sentences)? I don't think so.
On the first rendition of my site, I too concerned myself more with appearance than semantics. Quick'n'dirty, it looked right across browsers, but wasn't semantically correct, or particularly tight.
About a year later I went back, did a total redesign observing good semantic composition rules. My search engine rankings shot up overnight. Take it for what it's worth.