OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
CSS Bugs...
This page's ID:
25460
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
using this setup works for both firefox and ie - [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Untitled</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> img { border:none; } dl.gall { float:left; margin:10px; } .gall dt { background:none; } .gall a img { display:block; margin:auto; } .gall a { display:block; border:1px solid #eaeaea; padding:5px; } .gall a:hover { border:1px solid #ccc; } </style> </head> <body> <dl class="gall"> <dt> <a href="serves/01.jpg" title="View Serve"> <img src="images/pic01.jpg" width="75" height="75" alt="Round About" /> </a> </dt> <dd>Caption</dd> </dl> </body> </html>[/code] 1) proper tag closing: make sure youonly use the trailing slash to close empty tags - not thins like the <a> tag! 2) setting the <a> to display block and setting the hover attributes to it will get you the effect you want. It is a shame that IE does not recognize hover for other elements, but that's what we're stuck with at the moment. 3) the height and width of an image should be specified in the HTML - it's one of the very few elements that should be done that way. Also, while the title attribute is ok to use for the img tag, it does not replace the alt attribute - always use the alt attribute! As for the table/list deal - I undersstand that's not what your problem is, just trying to clarify good coding practices. Use whatever element is appropriate for the task at hand. In this case, it's hard to say without seing a total page. It could be that a list is the right thing to use. It could be that a table is. It could very well be that niether element is appropriate. [url=http://in-dented.com/sigs.html][img]http://www.in-dented.com/sigs/knot_sig_32.gif[/img][/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »