Aligning Background Images next to Text in Blocks

Discussion in 'CSS' started by Anduril66, Jan 12, 2007.

  1. #1
    The navigation bar at my website, steakinfo.com consists of links in blocks. I wanted to write my stylesheet so when you hover over the block, a steak icon appears flush to the text, but I only know how to make the icon at the far left of the block like this.[​IMG]
    This is my css:
    and my html
    Do you know how I can make the icon flush with the text when I hover over the link box? Thanks for your help.
     
    Anduril66, Jan 12, 2007 IP
  2. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Whenever I've needed to do this, I've just played around with the padding and margin values until its where I want it.

    I've not used them on block elements though so that might complicate things. Seeing as its a <ul>, is there any need for each <li> to explicitly be blocks?
     
    MattD, Jan 14, 2007 IP