SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2012
    Location
    Hawaii
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Logo Aligning

    I'm having some trouble getting my to vertically align to the middle of my nav bar. Currently it seems to demand being top aligned. If anyone can give me some help it would be much appreciated!

    artsatheart.atwebpages.com

    Thanks!

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,276
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You could just giver it the image a top margin and move it down a couple of pixels.

    Or for automatic alignment you could do this:

    Code:
    #navigation li:last-child{
    float:right;
    height:80px;
    }
    
    #navigation li:last-child img{
    float:none;
    display:inline;
    vertical-align:middle;
    }
    If you want to support IE8 as it doesn't understand last-child you would need to add a class to the last item instead and use the class instead of last-child.

  3. #3
    SitePoint Member
    Join Date
    Oct 2012
    Location
    Hawaii
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Solved. Thanks!


Bookmarks

Posting Permissions

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