Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS <img>

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #23855
    runa
    Member

    Hello everyone and happy new year!
    I have some trouble with css-ing the <img>-tag. Whatever I try, it just doesn’t behave like other elements, <li> for instance.

    html:

    <div id="one"><img src="photo.jpg" width="200px" height="100px" border="0" /></div>

    css:

    img
    #one img { }
    #one img a { text-decoration: none; outline:0; }
    #one img a:link { border: 1px solid white }
    #one img a:hover{ border: 1px solid red }

    If I’d do the same css on an unordered list, everything would work fine. The list item has a white border that becomes red when the cursor is hovering over the item. But that isn’t happening with <img>. The border is sometimes white sometimes unvisible (when border:0 in the reset at the beginning of the css-file). The hover effect is not working. I am not quite sure how border="0" in the markup is interacting with the css.

    Thanks,
    Runa

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.