All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Aligning a nav/menu with an img (or vice versa)

  • # April 10, 2013 at 5:33 pm

    more rook q?s.

    Working on a menu that has a 100×100 img on left and a nav/text menu along it’s right.
    I’m trying to have the menu/text align along the center of the img. By default, they’re aligning along the top margin.
    I originally had it all in the nav menu and when I stuck a line height, i got a clickable area on the menu items the size if the img.
    I then split the two, and floated the menu right, img left, and gave the menu a top margin to *solve* the problem. But I feel like I just cheated. hehe.

    There must be a simple and proper way of writing that out to get desired effect. Again, apologies for the likely simple questions. This is new to me.

    as always, many thanks for your time

    # April 11, 2013 at 4:03 am

    >I then split the two, and floated the menu right, img left, and gave the menu a top margin to solve the problem. But I feel like I just cheated.

    Nope…works for me…what’s wrong with top-margin? That’s what it’s for.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed