Cannot be a Container for ? - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Helge Moulding wrote:
> I've tried the following:
> <a name="foo" class="foostyle">Text in foo <a href="bar">link in foo</a>
> and more text.</a>
> I kinda thought that oughta work. But I found that foostyle is applied
> only up to the link in foo. After that the style disappears. This
> happens in both Mozilla and MSIE. Even adding contextual selectors to
> the style doesn't help.
> I played around with it using the Mozilla composer, and found that the
> composer always repositions the </a> for the anchor to just before the
> <a> for the link. To me that implies that an <A> cannot be a container
> for an <A>. Is that correct? Or is there something else that I'm
> overlooking?
> Since I'm not likely going to change the implementation of 99% of the
> browsers out there, it's more important that I figure out what to do
> about this. What I'm doing is using a bit of script to switch styles
> dynamically, to highlight a piece of text. The reason for doing it this
> way stems from the fact that document.anchors is supported by both
> Mozilla and MSIE. I'd like the text to include links, but then the
> highlight stops at the link. What I've done for now is to code it as
> <a name="foo" href="bar" class="foostyle">Text in foo with link in
> foo and more text.</a>
> which works, but has the unsatisfying side effect of turning the entire
> section into a link, and limiting me to just one link per section.
> /
> is the page I'm talking about. The calendar on the right side is created
> by the script, and when you move the mouse over the dates in September
> (there are no hot dates in August), then the corresponding sections
> above light up. I've removed the text underline, because an entire
> section underlined looks unattractive. But if I knew of a way to get
> around the "no <A> in <A>" limitation, I'd be a lot happier.

This should solve your problem:

And remember presentation comes after semantically meaninfull mark-up


Site Timeline