CSS : space between h2 and ul
# December 4, 2012 at 7:07 am
Hello everyone this is my first discussion here, so sorry for the mistakes I’ll do.
Here is the problem: I need to add space between an h2 and a ul element so i tried different things but it only works fine if I add margin-top and margin-bottom to the li elements. The problem is that I can’t use these rules because of some RWD reasons.
I really don’t understand why it doesn’t work if I write margin-top and margin-bottom to the ul and not to the li.
So here is the code, and thanks for helping! :D
width: 72.916667%;/* 700px/960px */
margin: 0 auto;
background: url(../img/orizz.png) repeat-x;
background-position: center center;
font-size: 1.875em; /* 30px/16px */
padding: 1px 15px;
}# December 4, 2012 at 8:50 am
This reply has been reported for inappropriate content.
overflow: hidden;– I’d recommend against using this all the time for clearing floats as it will cut off box shadows and any elements that are positioned to overlap the container.
Instead have a look at the micro clearfix from Nicolas Gallagher as it’s much safer and all you need to do is add a class of cf to your elements.
You must be logged in to reply to this topic.