Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lists in Opera 1

Status
Not open for further replies.

dislimbic

Programmer
May 7, 2002
34
CA
Hi all, I have a question about lists in opera. I can't seem to find any info on this subject. My problem is that opera seems to put way more spaces between each <li> tag than either netscape or IE. The only way I can fix this problem is by adding style to the <ul> or <li> tags, that of course puts them way too close together in IE and netscape. Here's what I've done to make the lists appear the same in Opera.

<ul style=&quot;line-height:15px;font-size:11pt;&quot;>
<li>List Item 1
<li>List Item 2
<li>List Item 3
</ul>

any better ideas???

dis
 
Try closing your <li> items (</li>). Opera is pretty strict about things other browsers let slide.
 
thanks wray, but I already tried that, I've tried specifing the font so that the fonts are the same etc... whatever I do in IE or netscape is farther apart in Opera (both versions 5 and 6) I've tried changing some of the preferences in opera thinking maybe it wasn't in my code, but in the browser. No luck yet. If you want to take a look, just make a simple <UL> and view it in opera and then in another broswer. It's not a big deal, but on a couple of pages i'm doing for this site there are very long lists and over a whole page that makes a huge difference.

Thanks for helping
 
Set the margin of the <li> elements to 0. IE 5.5, Netscape 6.2, Opera 6.01 all respond with the same spacing between list items. I used this style sheet with your three line list --
Code:
li {margin: 0}
ul {font-size: 11pt; line-height: 15px}
Apparently there is some debate about whether <li>'s can inherit margin settings from <ul>'s. Or maybe this is a feature/bug.
 
Wow! thanks wray, works great!! I never even thought of that. You get a star for being such a great help.

dis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top