Deb
Deb

Reputation: 991

Incorrect CSS left Margin in ul

I am getting this strange left margin in my tabs list.

I have not provided any margin. where does it come from ?

here is the screen. The incorrect area is marked in the red box.

Thanks

enter image description here

Upvotes: 0

Views: 463

Answers (3)

gearsdigital
gearsdigital

Reputation: 14205

This is because the Default Browser Stylesheet.

Try:

ul {
    margin:0;
    padding:0;
}

or more specific

#tabs_container ul.tabz {
    margin:0;
    padding:0;
}

or more generous

/* Basic Reset; remove margin and padding for every element */
* {
    margin:0;
    padding:0;
}

Upvotes: 2

Sebastien Crapoulet
Sebastien Crapoulet

Reputation: 177

You should always use a css reset to get good results on all browsers. For example:

http://meyerweb.com/eric/tools/css/reset/

Upvotes: 0

ajm
ajm

Reputation: 20105

Unless you have explicitly removed it, that margin is coming from the user agent stylesheet used as the browser default.

If you want it to be removed, you may want to investigate CSS reset stylesheets.

Upvotes: 2

Related Questions