Grow your CSS skills. Land your dream job.

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.

*May or may not contain any actual "CSS" or "Tricks".