简体   繁体   中英

Viewing list wrong on firefox

So i have this problem:

-On Chrome its showing this:

''' '''

-On Mozzila Firefox its showing this:

''' '''

I want to look like on chrome does on every platform.

 <h3>Servicii</h3> </br> <ul> <li><a href="#><h4 style="color:#2e3760;">Beneficiari publici</h4></a></li> <li><a href="#"><h4 style="color:#2e3760;">Beneficiari privati</h4></a></li> <li><a href="#"><h4 style="color:#2e3760;">HelpDesk</h4></a></li> </ul>

Firefox doesnt like the heading tag inside <a> tag, it seems.

Headingscan'tshouldn't be nested inside a phrasing content like a link or weird layout issues could happen, so try this structure instead

<h3>Servicii</h3>
<br>
<ul>
<li><h4 style="color:#2e3760;"><a href="#>Beneficiari publici</a></h4></li>
<li><h4 style="color:#2e3760;"><a href="#>Beneficiari privati</a></h4></li>
<li><h4 style="color:#2e3760;"><a href="#">HelpDesk</a></h4></li>
</ul>

As a side note, there's no a </br> tag

 <h3>Servicii</h3> <br> <ul> <li><h4><a href="#" style= "color:#2e3760;" >Beneficiari publici</a></h4></li> <li><h4><a href="#" style= "color:#2e3760;" >Beneficiari privati</a></h4></li> <li><h4><a href="#" style= "color:#2e3760;" >Help Desk</a></h4></li> </ul>

You can not use "Headings inside of an "Anchor" tag but you can use Anchor tag inside of a heading like my code. and sometimes you could face a problem with colors. It's better to define style on an inside element like I declared color inside a tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM