views:

122

answers:

5

Hi,

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 :)

+7  A: 

you did not properly close your ul tag (missing /)

iDevlop
+4  A: 
<ul> <!-- Begins an unordered-list -->
  <li>Yahoo</li>
  <li>Google</li>
</ul> <!-- Ends an unordered-list -->
Jonathan Sampson
A: 

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

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

Fedor Hajdu
Patrick was faster.
Fedor Hajdu
Didn't knew SO was a race. That's a very lame excuse when talking about unnoticeable gaps of less than a few minutes.
BalusC
@BalusC What do you mean?
Fedor Hajdu
A: 

Guysss....it was a copy/paste mistake...

My code is as below....it still gives me the problem :(

< ul> <!-- Begins an unordered-list --> 
  < li>Yahoo< /li> 
  < li>Google< /li> 
< /ul> <!-- 
Anish Mohan
Do not post comments/updates as answers. Post comments as comment by `add comment` link. Post updates by `edit` link below your question. Then delete this unnecessary message by `delete` link.
BalusC
+1  A: 

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

Chuck