Stop underlining everything?

User avatar
whoami
MM2X Very Active User
MM2X Very Active User
Posts: 1370
Registered for: 13 years 6 months
Location: Has been located.
Contact:

Stop underlining everything?

Postby whoami » 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:

Code: Select all

A:hover {BACKGROUND: none; COLOR: #CCCCCC; FONT-SIZE: 10px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: underline}
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:

Code: Select all

<a> <stuff> </a>
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. :D
[color=white]Nobody told me MM2 works on Windows 10![/color]

User avatar
RohitXL5
MM2X Active User
MM2X Active User
Posts: 901
Registered for: 11 years 5 months
Location: Indore, Madhya Pradesh, India

Postby RohitXL5 » Mon Mar 14, 2016 2:20 pm

Great find! 8)
[img][/img]

[color=#01B5DD][size=150]Boss of Martians![/size][/color]

[img][/img] [color=yellow]Best Active Member MM1 screenshot-er | Best MM2 breakout of the year[/color]
[img][/img] [color=yellow]Author of the best mod of the year[/color]

User avatar
Franch88
MM2X Admin
MM2X Admin
Posts: 15758
Registered for: 16 years 9 months
Location: Italy
Been thanked: 1 time
Contact:
Italy

Postby Franch88 » Mon Mar 14, 2016 9:21 pm

Thanks for this find, but I don't know, I don't see it happening. :roll: How does it happen for you, precisely?
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|

User avatar
whoami
MM2X Very Active User
MM2X Very Active User
Posts: 1370
Registered for: 13 years 6 months
Location: Has been located.
Contact:

Postby whoami » Thu Mar 17, 2016 5:50 am



Here's a before and after.

Also, sorry for the late response, I forgot to check for any. Silly me.
[color=white]Nobody told me MM2 works on Windows 10![/color]

User avatar
Midas
MM2X Newbie
MM2X Newbie
Posts: 31
Registered for: 15 years 3 months
Location: Belgium

Postby Midas » Mon Apr 18, 2016 2:48 am

Yup, I also noticed this. Better change the HTML code so there is no <a> tag at all.