Geocrafter Geocrafter - 1 year ago 60
CSS Question

How to place items exactly where you want to CSS

Alright, so this is my HTML right now.

<!DOCTYPE html>
<title>GeoVillage - A Community</title>
<link rel="stylesheet" href="style.css">
<div id=header>
<img id=logo src="/logo.png" alt="GeoVillage Community" style="width:500px;height:128px;">
<span id=logreg>
if(isset($_SESSION['loggedon']) && $_SESSION['loggedon'] == true){
echo '<a href=/logout>
<img id=logout src="/logout.png" alt="Logout">
} else {
echo '<a href=/login>
<img id=login src="/login.png" alt="Login">
echo '<a href=/login/register.php>
<img id=register src="/register.png" alt="Register">
<li><a href="/vatsim">FSX/X-P/P3D Vatsim Online Material</a></li>
<li><a href="/dev2">Development Page</a></li>

And this is my CSS file.

background-color: #33ccff;
margin: 0px;


Right now, the Login and Register buttons are at the top, but aligned essentialy with the bottom of the banner. How would i position it so it would be aligned with the top of the banner?

Answer Source

Try this

#logreg {vertical-align: top;display: inline-block;}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download