Jump to content
xisto Community
Sign in to follow this  
matak

[problem] Css Unordered List Display Problems Ie6 Bug Making unordered list under unordered list couses some padding to appe

Recommended Posts

I just started designing something that i thought is gonna be a really simple xHTML strict template. Everything is right except that i thought of using unordered list, some other list under that list. Well this is the code for the Menu that is cousing me problems

<div id="lijevo">	<ul>		<li>List1</li>		<li>List2</li>		<li>			<ul>			<li>List 2 Sublist</li>				<li>					<ul>						<li>This is really long text that explains a bunch of nothing3</li>						<li>This is really long text that explains a bunch of nothing2</li>						<li>This is really long text that explains a bunch of nothing1</li>					</ul>				</li>			</ul>		</li>		<li>List3</li>		<li>			<ul>			<li>List 3 Sublist</li>				<li>					<ul>						<li>This is really long text that explains a bunch of nothing3</li>						<li>This is really long text that explains a bunch of nothing2</li>						<li>This is really long text that explains a bunch of nothing1</li>					</ul>				</li>			</ul>		</li>	</ul>		</div>

I arranged CSS with few simple code lines like this

div, p, h1, ul, li{margin:0;padding:0; list-style: none; }div#lijevo ul {	/*indenting and width*/	margin-left: 10px;}

At first i didn't use that <li> tag before <li>list2 sublist</li> but that didn't validate as (x)HTML strict :unsure:. Then when i added the tag IE shows padding under <li>List2</li>, like you can see it on test website HERE.

Anyone knows simple way to overcome this problem..

Share this post


Link to post
Share on other sites

Try adding zero margins and padding to the universal star selector as follows:

* html {margin:0;padding:0;}
That should eliminate all margins and padding on all elements on the page. You will then need to add back the magins and padding where you want some. Alternately, use a more specific selector to target the UL li UL for the second lists.

check this out: http://forums.xisto.com/no_longer_exists/

Share this post


Link to post
Share on other sites

Lol, thanks for the * html tip :(.. And guess what, it wasn't CSS but HTML problem.. I opened and closed the wrong <li> at top. Now i saw how u did it and it's fixed.

 

What can u say. Except, do you eat fish Posted Image

 

Oh, boy i really need to sleep now :unsure:

Thank you very much!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.