Maybe there is a simple trick here, and I'm not spotting it... Is there a
guru of CSS hanging around here who can help out?
The page in question has a multi-column table with a list of links in each
column. Because links are added and deleted separately in each column, it
would be exceedingly awkward to use a separate table row for each link.
Therefore, within each column the links are separated by <br> tags. However,
the automatic line wrap for long link descriptions causes them to appear to
be two or more separate links. This makes it hard to pick out the proper
links. A natural solution would be to use a hanging indent so that the first
line of each actual link will stick out to the left.
I thought I could do that with the usual hanging indent trick of a left
margin and a negative text indent in the CSS, though it seems to be a bit
unusual to do it to the A tag. However, what actually happens is that the
first A tags in each TD do the right thing, but the later A tags ignore it.
It seems like I can't associate the left indent with each A tag separately?
Because this is an intranet page, I can't link directly to it, but this is a
(sanitized) version of the links in one column.
<TD valign="top">
<DL>
<DT>Category1 Description
<DD>links
<DT>Category2 Description
<DD><A href="http://server1.com/link1">1st link description</A><BR>
<A href="http://server2.com/link2">2nd link description</A>
<DT>Category3 Description
<DD><A href="http://server3.com/link3">3rd link description</A>
<DT>Category4 Description
<DD><A href="http://server4.com/link4">4th link description</A>
<DT>Category5 Description
<DD>links
</DL>
</TD>
Here is the CSS snippet that fails:
<STYLE type="text/css">
<!--
A{
text-indent : -1pc;
left : 1pc;
}
-->
</STYLE>
Suggestions or explanations will be greatly appreciated... However, now that
I've written it out, I suspect the real problem may be that you can't get
away with that kind of manipulation within the scope of a DL.
There's probably a completely different and much better way to do it?
guru of CSS hanging around here who can help out?
The page in question has a multi-column table with a list of links in each
column. Because links are added and deleted separately in each column, it
would be exceedingly awkward to use a separate table row for each link.
Therefore, within each column the links are separated by <br> tags. However,
the automatic line wrap for long link descriptions causes them to appear to
be two or more separate links. This makes it hard to pick out the proper
links. A natural solution would be to use a hanging indent so that the first
line of each actual link will stick out to the left.
I thought I could do that with the usual hanging indent trick of a left
margin and a negative text indent in the CSS, though it seems to be a bit
unusual to do it to the A tag. However, what actually happens is that the
first A tags in each TD do the right thing, but the later A tags ignore it.
It seems like I can't associate the left indent with each A tag separately?
Because this is an intranet page, I can't link directly to it, but this is a
(sanitized) version of the links in one column.
<TD valign="top">
<DL>
<DT>Category1 Description
<DD>links
<DT>Category2 Description
<DD><A href="http://server1.com/link1">1st link description</A><BR>
<A href="http://server2.com/link2">2nd link description</A>
<DT>Category3 Description
<DD><A href="http://server3.com/link3">3rd link description</A>
<DT>Category4 Description
<DD><A href="http://server4.com/link4">4th link description</A>
<DT>Category5 Description
<DD>links
</DL>
</TD>
Here is the CSS snippet that fails:
<STYLE type="text/css">
<!--
A{
text-indent : -1pc;
left : 1pc;
}
-->
</STYLE>
Suggestions or explanations will be greatly appreciated... However, now that
I've written it out, I suspect the real problem may be that you can't get
away with that kind of manipulation within the scope of a DL.
There's probably a completely different and much better way to do it?
Comment