Reputation: 11
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 able to get it vertically.
Plz help :)
Upvotes: 1
Views: 1039
Reputation: 25262
You did not properly close your ul
tag. You're missing a /
. It should be:
</ul>
Upvotes: 8
Reputation: 237060
Do not stick spaces before the tagname. For example, it should be <ul>
, not < ul>
.
Upvotes: 1
Reputation: 4697
Your html is not correct - ul tag is not closed.
Once you've fixed that both browsers will show what you wanted.
Upvotes: 0
Reputation: 268344
<ul> <!-- Begins an unordered-list -->
<li>Yahoo</li>
<li>Google</li>
</ul> <!-- Ends an unordered-list -->
Upvotes: 4