Stop underlining everything?
Posted: Mon Mar 14, 2016 1:46 pm
Hey.
So I was browsing MM2X, you know, for the old times' sake. And I noticed that in the downloads section, when you hover over anything, everything gets underlined.
I checked it out, and it seems it's because of this CSS rule:
So all the <a> tags in the page get underlined when hovered. <a> tags are usually links, so that's fine. But on MM2X, the pages use this:
These aren't links, they're like name indicators. So when you open modules.php#someNameHere, it scrolls down automagically to the someNameHere tag.
For example, here, I scroll down to the Chicago Golden Edition Race Mod V2 (as of this writing):
https://www.mm2x.com/modules.php?name=Downl ... d=117#1416
Now, all the main content in the page is wrapped in a tag <a>, so all the main content is part of this tag. So when we hover over any of this content, it gets underlined.
One fix would be to change the CSS rule from a:hover to a[href]:hover - the href attribute tells the link where to go, and in the case of the <a> ones here, there's no href tag, so all the normal links would get underlined, while none of the other content - that isn't in a link - would.
Thanks.
So I was browsing MM2X, you know, for the old times' sake. And I noticed that in the downloads section, when you hover over anything, everything gets underlined.
I checked it out, and it seems it's because of this CSS rule:
Code: Select all
A:hover {BACKGROUND: none; COLOR: #CCCCCC; FONT-SIZE: 10px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: underline}
Code: Select all
<a>
<stuff>
</a>
For example, here, I scroll down to the Chicago Golden Edition Race Mod V2 (as of this writing):
https://www.mm2x.com/modules.php?name=Downl ... d=117#1416
Now, all the main content in the page is wrapped in a tag <a>, so all the main content is part of this tag. So when we hover over any of this content, it gets underlined.
One fix would be to change the CSS rule from a:hover to a[href]:hover - the href attribute tells the link where to go, and in the case of the <a> ones here, there's no href tag, so all the normal links would get underlined, while none of the other content - that isn't in a link - would.
Thanks.