[thelist] CSS: display: block on links
Bill Moseley
moseley at hank.org
Sat Jan 13 13:27:07 CST 2007
On Sat, Jan 13, 2007 at 05:38:31PM +0000, kasimir-k wrote:
>
> Bill Moseley scribeva in 13/01/2007 17:10:
> > Where this doesn't work so well is when I have text on a second line:
> >
> > <td>
> > <a href="stuff">x</a>
> > <br />
> > Some other text
> > </td>
>
> So if the <a> has a sibling node, then you don't want it display: block?
Not really. It's more of a css issue I suppose:
The above markup before applying display: block looks something like:
+----------------------------+
| x |
| Some other stuff |
+----------------------------+
Then when display: block is applied to the <a> I get extra white
space:
+----------------------------+
| x |
| |
| Some other stuff |
+----------------------------+
When all I'm really trying to do is allow clicking not only on the "x"
but anywhere to the right of it.
> if (link.length != 1 || link.nextSibling) continue;
Ya, that's a possibility. Thanks.
--
Bill Moseley
moseley at hank.org
More information about the thelist
mailing list