开发者

<UL> <LI> tag issue in firefox

开发者 https://www.devze.com 2022-12-15 21:37 出处:网络
When I am aligning items vertically using <ul> & <li> tag, the following issue occurs

When I am aligning items vertically using <ul> & <li> tag, the following issue occurs

My code is as follows :

< ul>
< li>
yahoo
< /li>
< li>
google
< /li>
< ul>

I'm getting yahoo google listed horizontally in Firefox...but in IE am abl开发者_如何学Ce to get it vertically.

Plz help :)


You did not properly close your ul tag. You're missing a /. It should be:

</ul>


<ul> <!-- Begins an unordered-list -->
  <li>Yahoo</li>
  <li>Google</li>
</ul> <!-- Ends an unordered-list -->


Do not stick spaces before the tagname. For example, it should be <ul>, not < ul>.


Your html is not correct - ul tag is not closed.

Once you've fixed that both browsers will show what you wanted.

0

精彩评论

暂无评论...
验证码 换一张
取 消