Posts: 850
Name: Matt Pealing
Location: England, north west
|
I have a ul that I have styled using CSS, after A LOT of messing around it suddenly seems to be working how I intended.
But when I insert it into a DIV it loses its margins around the <a> elements! Can anyone figure out why??
HTML:
Code:
<div class="fifty">
<ul class="connect">
<li><a href="#">Content</a></li>
<li><a href="#">asdfasdf</a></li>
<li><a href="#">asd</a></li>
<li><a href="#">fasdf</a></li>
<li><a href="#">asdfasdf</a></li>
</ul>
</div>
CSS:
Code:
ul.connect {
margin:0;
padding:0;
list-style-type:none;
}
ul.connect li {
display:inline
}
ul.connect a {
width:100%;
display:block;
background-color:#323232;
margin-bottom:1px;
}
div.fifty {
width:50%;
display:inline;
float:left;
background-color:#323232;
}
Thanks to those who can help.
|