Treehouse: Grow your CSS skills. Land your dream job.

DIV alignment in a Link

  • # June 16, 2013 at 10:12 am

    On one of my websites, I promote flash games that have been developed by others. I am currently working on a new format on the “Games” list page. To save on the number of requests to the server, I have used image sprites for the icons that go in the buttons. Maybe I have overlooked something simple, but I can’t seem to get the icon DIV to align properly with the text of the button.

    The item I’m talking about is on this page as of 6/15/2013.
    [InteractiveGames – Game List]( “InteractiveGames – Game List”)

    You’re Free to make any further suggestions you think would make this page better as well.

    # June 16, 2013 at 2:18 pm

    The div is unnecessary mark-up.

    Why don’t you just use the background image on the button itself or in a pseudo element?

    # June 16, 2013 at 7:18 pm

    Thank you so much, I knew I was making it more complicated than it had to be!

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

You must be logged in to reply to this topic.