Can't understand why,despite having the same width:450px and margin:0 auto, width of .menu and width of .blog is different. See my code:
body {
border-top:4px solid #F55D2D;
background: white;
margin:0 auto;
font-family: 'Mako', sans-serif;
}
header {
width:450px;
text-align:center;
margin:0 auto;
}
.menu {
width:450px;
margin: 0 auto;
background:green;
}
.menu li {
display:inline;
padding:5px 15px;
}
.blog {
width: 450px;
margin:0 auto;
background:green;
}
.post {
/*border: 1px solid grey;*/
margin: 20px auto;
height:125px;
padding:0 10px;
border-radius:4px;
color:black;
transition: height 0.5s;
-webkit-transition: height 0.5s;
-moz-transition: height 0.5s;
position:relative;
}
.post::after {
background:url(Photos/intro3cropped.jpg);
content: "";
opacity: 0.3;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
background-repeat: no-repeat;
}
<body>
<header>
<h1 class="title">XYZ EVENTS</h1>
<ul class="menu">
<li class="menuAll">ALL EVENTS</li>
<li class="menuConcert">CONCERTS</li>
<li class="menuTheatre">THEATRE</li>
<li class="menuFestival">FESTIVALS</li>
</ul>
</header>
<div class="blog">
<div class="post concert">
<h4>Concert 1</h4>
<p>Where: XYZ Arena</p>
<p>When: XYZ h</p>
<small>(Click to expand)</small>
<p class="descr">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</p>
</div>
Why .blog is thinner than .menu? Thanks!