Artist: Biagio Antonacci
Biagio Antonacci is an Italian singer, music producer and songwriter. He was born and raised in Milan, Italy. He studied piano and guitar and learned about music theory, composition, arranging,. [UPDATED] Biagio Antonacci Discografia Completa 640l.Q:
What is the reason for this weird alignment issue with css and html?
See
HTML
one
two
three
CSS
div.box {
width: 200px;
background: #000;
overflow: hidden;
height: 100px;
margin: 10px auto;
position: relative;
}
ul {
width: 200px;
background: red;
height: 100px;
margin: 10px auto;
position: relative;
}
ul li {
display: inline-block;
width: 50px;
height: 100px;
margin: 1px;
position: relative;
}
ul li a {
display: inline-block;
width: 100%;
height: 100%;
background: #ddd;
padding: 0 10px;
color: #fff;
}
You can see how the a tag is coming before the list items on the left and how the a tag on the right side is aligned with the last item in the list item.
I want to ask why this is happening and how can I fix this.
Thanks!
A:
It's happening because the is wider than the .
Because of the way you are setting the display properties to inline-block on the elements, this makes them have a default display of table-cell ac619d1d87
Related links:
Comments