View Full Version : Problem Aligning things vertically
mrodriguez
09-02-2007, 07:51 PM
I have a logo on the top left of the page and under it to the right are tabs. Right under the tabs is the content which spans the whole page. I want to have the logo and the tabs side by side. But when I float the logo left, since it is taller than the tabs, these align themselves to the top of the logo. I want them at the bottom, so they keep touching the content pane. How do I do this?
PremiumBlend
09-02-2007, 08:03 PM
Can you post your code please?
mrodriguez
09-02-2007, 08:10 PM
<div id="header">
<div id="logo">
<img src="images/logo.png" alt="Artekasa Logo">
</div>
<div id="tabs">
<ul>
<li><a href="catalogo.html" title="Cátalogo"><span>Cátalogo</span></a></li>
<li><a href="ubicacion.html" title="Ubicación"><span>Ubicación</span></a></li>
<li><a href="contacto.html" title="Contáctenos"><span>Contáctenos</span></a></li>
<li><a href="index.html" title="Inicio"><span>Inicio</span></a></li>
</ul></div>
</div>
Note: This tab code is not mine, I got it off the web
#header {
margin:0;
padding:0;
}
#logo {
margin-left: 3em;
padding:0;
height:auto;
background-color:#fff;
}
#tabs {
font-size:93%;
padding:0;
margin-right:5em;
}
#tabs ul {
margin:0;
padding:10px 10px 0 50px;
list-style:none;
}
#tabs li {
display:inline;
margin:0;
padding:0;
}
#tabs a {
float:right;
background:url("images/tableft3.gif") no-repeat left top;
margin:0;
padding:0 0 0 4px;
text-decoration:none;
}
#tabs a span {
display:block;
background:url("images/tabright3.gif") no-repeat right top;
padding:5px 15px 4px 6px;
color:#FFF;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabs a span {float:none;}
/* End IE5-Mac hack */
#tabs a:hover span {
color:#FFF;
}
#tabs a:hover {
background-position:0% -42px;
}
#tabs a:hover span {
background-position:100% -42px;
}
ahallicks
09-02-2007, 08:16 PM
Couldn't you just pad #tabs from the top until it is aligned at the bottom? Or create an empty div that acts as a 'spacer' filling the gap and allowing the tabs to look as though they are shifted down in line with the bottom of the logo?
mrodriguez
09-02-2007, 08:24 PM
Padding the top just pushes down the logo and content further down while tabs remain exactly where they are up top for some reason. I'll keep trying different things but this is frustrating...BTW its my first website...
mrodriguez
09-02-2007, 08:27 PM
The spacer div did it! Thanks alot... Might be a little issue for you guys but learning to do layout with css took me awhile..
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.