Old 20-05-2008, 08:41   #1 (permalink)
animatorsathish
Sathish babu
 
Join Date: Apr 2006
Location: chennai
Posts: 18
css bug in opera & firefox

Hi,

I am facing a problem while using css. pls look at the following code.

<html>
<head>
<style type="text/css">
html,body{
margin:0;
padding:0;
}
ul{margin:0;}
</style>
</head>

<body>
<ul>
<li>Margin problem</li>
</ul>
</body>
</html>




Problem: when i set margin=0 for the 'li' item its removed when i view from Internet Explorer. But still there is some left margin on other browsers like Opera and firefox. How do i overcome this?

Can anybody help me?

Thanks in advance.
Sathish.
  Reply With Quote
Old 20-05-2008, 08:45   #2 (permalink)
freelancr
Senior Member
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 2,295
  Reply With Quote
Old 20-05-2008, 10:37   #3 (permalink)
Kev
Registered User
 
Kev's Avatar
 
Join Date: Mar 2008
Location: London
Posts: 17
I usually do this to begin with to get rid of all margins and padding.

* {
margin:0;
padding:0;
}

In your case you also need to put zero margin on the <li>
  Reply With Quote
Old 20-05-2008, 10:58   #4 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
I believe some browsers use margins and some use padding to indent lists.

Quote:
Originally Posted by Kev
I usually do this to begin with to get rid of all margins and padding.

* {
margin:0;
padding:0;
}

In your case you also need to put zero margin on the <li>
Terrible idea. That fucks up form controls. Use a CSS reset instead.

We use Yahoo's Yahoo! UI Library: Reset CSS
  Reply With Quote
Old 21-05-2008, 05:30   #5 (permalink)
animatorsathish
Sathish babu
 
Join Date: Apr 2006
Location: chennai
Posts: 18
It works!!

Thanks mates!!!
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8