Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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

  • #4
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts
    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...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •