Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-01-2009, 06:32 PM   PM User | #1
jihanemo
Regular Coder

 
Join Date: Oct 2008
Posts: 183
Thanks: 12
Thanked 0 Times in 0 Posts
jihanemo is an unknown quantity at this point
Problems with Vertical Align...

http://americanchic.net/blank.html

I'm having problems trying to vertical align EVERYTHING in the "topnav" div. You'll see that the free shipping image and live chat image at the top of the screen seem to be vertically aligned in the middle but the text menu is aligned at the top. How can I get [I]all/I] of them to set in the middle?

Trying to middle-align the dotted borders on the lists in the "navbar" div. You see that the text in each individual list is aligned vertically in the middle but the borders on each list look as if they're closer to the bottom of the div. How can I fix that?
jihanemo is offline   Reply With Quote
Old 11-01-2009, 06:41 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello jihanemo,
Have a try with directly positioning the a instead of trying to get it to inherit from it's container.
Like this -
Code:
td.topimgnav {

width: 40%;
vertical-align: middle;
padding: 0;
margin: 0;

}


img.freeship {

border: 0;
vertical-align: middle;

}
td.toptextnav a{vertical-align:bottom;}

td.toptextnav {

text-align: right;
vertical-align: bottom;
padding: 0;
margin: 0;

}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-01-2009, 06:49 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by jihanemo View Post
Trying to middle-align the dotted borders on the lists in the "navbar" div. You see that the text in each individual list is aligned vertically in the middle but the borders on each list look as if they're closer to the bottom of the div. How can I fix that?
Try adding a line-height to your ul ...
Code:
ul.navbar { 

list-style-type: none;
padding: 0;
margin: 0;
line-height:22px;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-01-2009, 08:37 PM   PM User | #4
jihanemo
Regular Coder

 
Join Date: Oct 2008
Posts: 183
Thanks: 12
Thanked 0 Times in 0 Posts
jihanemo is an unknown quantity at this point
Thank you. Solution for the topnav vertical align worked somewhat, except that the slashes don't work off of a link - they're plain text. So those are still off...

2nd solution only moved everything closer to the top of the divs. List text and list borders still won't line up vertically...
jihanemo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:23 PM.


Advertisement
Log in to turn off these ads.