ars aranea. the web, the way we make it. | |||
35 CSS image hover captionsPosted: Dec 22, 2005, under DHTML. Updated: Mar 31, 2006. Add a comment!Here’s a quick CSS example which will show you how to create image captions that appear only when the mouse pointer hovers over the image. They are done entirely in CSS, without any need for JavaScript. They’re great for stylish photo galleries. 1. The CSS and XHTML codeHere’s the working code, which you can copy and paste and see working:
2. Working exampleYou can see the example in action here. You can also see a more complex example, an entire photo gallery, over at Flock. 3. ExplanationsWhat we do is define a block with a fixed size, in the form of a Inside the block we put a simple The first trick is to grant the caption How we make it appear is the second trick: we use the The third trick consists of having the container block assume One more trick: set the 4. Cross-browser compatibilityUnfortunately, Internet Explorer doesn’t support hovering over one element to pass style effects to another. However, by setting the Keep the There is, of course, a trick to make Explorer change one element upon a
| Important
Categories
Authoring
(1)Books (2)Cross platforms (2)DHTML (12)Graphical design (3)IT today (12)Morals&Politics (10)ODP (1)Random stuff (3)Romania (16)Security (7)SEO (2)Software (8)SQL (1)Standards (7)Technology (3)WordPress (4)[În română] (4)[This website] (2)Time-jump Syndication Need hosting?I've been a happy user of LunarPages since 2005. |
||
Copyright ©2005–2008 Zuavra | |||