1

http://www.milknhny.co.uk/

I have an issue with a CSS problem that i cannot seem to locate, this is certainly not in my style.css and im confused as to where this is coming from.

Im trying to style my menu and it is causing me havoc in general.

The css that it is creating is the below:

ul, menu, dir {
display: block;
list-style-type: disc;
-webkit-margin-before: 1.1em;
-webkit-margin-after: 0em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 40px;
}

I have been informed that this is googles own style which is overiding my own.

Now i have added on this to my own CSS and overidden the 40px to 0 px !important on the padding-start. However i wish to avoid this.

Can anyone offer advice on how to resolve? As this is creating a large left hand padding on my menu (see website)

PLEASE IGNORE THE LOCATION OF THE MENU, as this hasnt been fully styled until i resolve this issue

Kirsty Marks
  • 483
  • 8
  • 29

3 Answers3

3

I just got the point. User agent stylesheet is giving out the padding value in addition to the padding value you mentioned into #agent li CSS part. I just took interest to remove that CSS in chrome DOM inspector and site looked fine for me

ashutosh
  • 1,192
  • 5
  • 22
  • 46
1

Would just say the same as ashutosh. If you specify UL to have zero padding should work ok. I think !important and inline CSS should be avoid so far as possible.

pzin
  • 4,200
  • 2
  • 28
  • 49
0

As specified here you may use the !important tag.

Another alternative is to use inline css on the affected item:

<div id="menuwrapper">
<div id="menuwrapperinner">
<div id="access">
<div class="menu">
   <ul style="padding: 0;"  >
   <!-- or 
   <ul style="-webkit-padding-start: 0;" > -->
       <!-- your <li></li> items here -->
   </ul>

(you may want to give it a try with Chrome Dev Tools)

PS: use a theme for wordpress or look at Bootstrap to implement your own menu.

Community
  • 1
  • 1
aldo.roman.nurena
  • 1,323
  • 12
  • 26
  • Hi aldo this is my own theme that I am developing. The CSS I found when I tried to establish where the padding was coming from as I had not specified Any padding on the menu. Thankyou for comment – Kirsty Marks Dec 24 '12 at 02:21