2 replies [Last post]
cssguy
Offline
Regular
Last seen: 16 years 18 weeks ago
Joined: 2004-07-28
Posts: 12
Points: 0

Hi all,

I'm trying to layout horizontal list of links in an absolute position (top right). for some reason this works on IE/MOZ but not on Opera. Opera puts line space between each LI. i.e - instead of:
item1 item2 item3 item4

I get:

item1
item2
item3
item4

(both examples aligned to the right)

can anyone assist?

CSS:

#cart  {
position:absolute;
right:10px;
top:9px;
}

#cart ul {
margin:0;
padding:0;
list-style:none;
}

#cart li {
float:left;
display:inline;
padding-left:10px;
}

XHTML:

<div id="cart">
	<ul>
		<li>item1</li>
		<li>item2</li>
		<li>item3</li>
		<li>item4</li>
		<li>item5</li>
	</ul>
</div>

The Finch
Offline
Enthusiast
Cincinnati
Last seen: 16 years 17 weeks ago
Cincinnati
Timezone: GMT-5
Joined: 2004-08-01
Posts: 65
Points: 0

opera with horizontal list on absolute position

Remove float:left; from #cart li

cssguy
Offline
Regular
Last seen: 16 years 18 weeks ago
Joined: 2004-07-28
Posts: 12
Points: 0

Thanks!

Worked like a charm.