This may seem like a simple thing, but I'm struggling to achieve it without using negative values for padding-top. Here's how my site looks:
Here is the CSS code I am using:
.center {
width: 1030px;
margin: 0 auto;
}
.top-panel {
background-image: url("images/top_panel.png");
background-repeat: repeat-x;
background-position: center;
height: 43px;
padding-top:5px;
}
a.top-button{
background: url("images/top_button.png");
height: 37px;
width: 141px;
background-repeat: no-repeat;
display: block;
}
.text {
color: #9c9c9c;
padding: 0px 160px;
line-height: 43px;
position: relative;
}
.panel {
color: #6ab1ed;
}
And here is my HTML structure:
<body>
<div class="top-panel">
<div class="center">
<a class="top-button" href="#"></a>
<div class="text">Currently playing: 5000 players on 150 servers!
<div class="panel">Register for free now</div></div>
</div>
</div>
</body>
Could someone provide me with a simple explanation on how to achieve this?