Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vertical Allign Bottom in CSS

Status
Not open for further replies.

oohoohoohooh

Programmer
Apr 30, 2005
55
GB
hI, i'm working on a website and trying to make it without using tables (using CSS). If you visit the website below you will notice the navigation bar is positioned in the top right hand corner because the default vertical align is top. I managed to position it on the right but I also want to position it so it's directly above the navigation bar so there is no gap. I have been trying for a while now but with no success. If anyone could show me how I'd appreciate it. Thanks

Here's a link to the website:
 
I believe you're applying 10px margin to your body element, which will create this gutter. If you do:
Code:
body {
  padding: 0;
  margin: 0;
}
the gap will disappear. I hope that is what you meant.
 
Vrag, I think he wants the tabs in the top right to sit on top of the yellow & blue line at the top of the main body.

The easiest way of doing it is to give the box-right div enough top-margin to push it down onto the top of the nav bar.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Hi I tried:

#header .box_right {
float: right;
position: relative;
top: 29px;
}

but the problem comes when you increase/decrease font sizes since I use percentage font sizes.

I've uploaded the modified version for you to see.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top