IE6 Bug or my bad code?

E

e n | c k m a

The following code works fine in Mozilla 0.7:

<ul>
<li class="sel">Home</li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="pricing.html">Pricing</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="portfolio.php">Portfolio</a></li>
<li><a href="faq.html">F.A.Q.</a></li>
<li><a href="signup.php">Sign-Up</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>

But in IE, the <li class="sel"> [which has a margin:5px] doesn't work. Or,
should I say, it DOES work, but not with the first list element.

If I put class="sel" on any other list item, it will work fine in every
browser but not if I put it on the first list item.

I was originally using <li><span class="sel">Home</span></li> and that
worked fine but I wanted to cut out all the <span>'s if it wasn't necessary.

Any thoughts? Thanks in advance,

Nick.
 
L

Leif K-Brooks

e said:
But in IE, the <li class="sel"> [which has a margin:5px] doesn't work. Or,
should I say, it DOES work, but not with the first list element.

URL?
 
R

rf

e n | c k m a said:
The following code works fine in Mozilla 0.7:

<ul>
<li class="sel">Home</li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="pricing.html">Pricing</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="portfolio.php">Portfolio</a></li>
<li><a href="faq.html">F.A.Q.</a></li>
<li><a href="signup.php">Sign-Up</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>

But in IE, the <li class="sel"> [which has a margin:5px] doesn't work. Or,
should I say, it DOES work, but not with the first list element.

what *exactly* is in the sel rule. Copy/paste the entire code.

It's not perchance .sel a {...} is it?

Cheers
Richard.
 
S

Sid Ismail

: But in IE, the <li class="sel"> [which has a margin:5px] doesn't work. Or,
: should I say, it DOES work, but not with the first list element.


Have you tried
li {margin-left:5px;} ?

Eliminate the class.

Sid
 
E

e n | c k m a

what *exactly* is in the sel rule. Copy/paste the entire code.
It's not perchance .sel a {...} is it?

Nope, not a .sel a {...}

..sel
{
padding:5px;
margin-left:5px;
display:block;
width:92%;
}

I've only just put in the margin-left:5px; - I didn't need it before when I
was using the <span>.

Thanks,
Nick.
 
E

e n | c k m a

Have you tried
li {margin-left:5px;} ?

Eliminate the class.

I'll have to try that later - the only thing is, I don't want the other
actual links to be affected by that. It would be great if everything (the
links and the 'sel'ected links) just lined up as they do in Mozilla.

Thanks,
Nick.
 
E

e n | c k m a

Haven't you got anything better to do <g>

it's just frustrating i guess. my partner doesn't mind though so i guess we
can live with it. stupid internet explorer.
It looks just fine in IE6 and Mozilla - different but nonetheless ok

yes, my mate's starting to get used to the whole standards compliant/no
javascript without reason/screw ie6 mentallity. which makes my job a bit
easier coz now i don't have to convince him so much to do things the "right"
way.

Thanks anyway,
Nick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top