I'm working on my site, and One thing that is bothering me most of all is aligning text itself vertically. For example, I'm making buttons for the site by using one background image, and when you mouse over the <div> of the button the class of the button changes and with it the background image. On the foreground is the text that answers the question 'Ooh, what does this button do?'. Now, I centered the text horizontally, but it's still on the first row vertically, so it's too high above the middle of the button. Here's the code for one button:
CODE
<li class="mainitems">
<div class="headerlinks"><a href="">
<!-- -->
<div class="button1" onMouseOver = "this.className = 'button2'" onMouseOut = "this.className = 'button1'">
<center>Tutorials</center></div>
</a></div>
<ul class="submenus">
<li><a href="">Gaming</a></li>
<li><a href="">Web Languages</a></li>
<li><a href="">Programming</a></li>
<li><a href="">Other</a></li>
</ul>
</li>
The <li> things are what opens when you mouse over, showing you different options in that category.
Here is the relevant CSS data:
CODE
.button1 {
background-image: url('Images/ButtonBGReg.png');
height: 40px;
width: 150px;
}
.button2 {
background-image: url('Images/ButtonBGOn.png');
height: 40px;
width: 150px;
}
.mainitems {
border-left-width: 0;
}
.submenus li{
width: 100%;
}
I have the same problem in other places, but I'm almost sure that if fixed in one I can fix it anywhere else. I tried CSS margin-top, by the way, but didn't work. Margin-left does work, for some reason.