- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m working on a nav.
I have my ul element styled with margin: 0 and padding: 0 but I still see padding. It looks like it’s coming from the Chrome user agent stylesheet.
http://cl.ly/image/1M262H2r3r1Y
I’m using normalize. How can I override this style? I’ve even tried setting padding-start: 0.
The other weird thing, Chrom dev tools don’t even seem to highlight the padded area as it normally would when hovering over it.
ul and/or li tend to have ‘built-in’ padding and/or margins.
Just try this as part of your reset.css
ul, li {
margin:0;
padding:0;
}
But I have both margin and padding set at 0. Check out that screen shot. I can’t figure out where that padding is coming from.
I’m trying to replicate it in a codepen, but so far with no avail.
Have you set the ul/li to margin/padding: 0 specifically rather than relying on a blanket * property…I find that it sometime doesn’t take with a * setting.
Your image is only on the ul…not the li
Perhaps a link to the actual site?