/ Published in: CSS
Nice clean, and semantically correct breadcrumb XHTML accompanied by the CSS.
Create a transparent GIF of the symbol '>' and save it in /img/gt.gif. This will be used for older browsers that don't support the :after pseudo element.
Create a transparent GIF of the symbol '>' and save it in /img/gt.gif. This will be used for older browsers that don't support the :after pseudo element.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<style type="text/css"> #breadcrumbs li { display: inline; } /* CSS3 breadcrumb */ #breadcrumbs li:after { content: " > "; } #breadcrumbs li.current:after { content: ""; } /* IE6 breadcrumb */ *html #breadcrumbs li { background: url( /img/gt.gif ) no-repeat center right; padding-right: 10px; margin-right: 5px; } *html #breadcrumbs li.current { background: none; padding-right: 0px; } /* IE7 breadcrumb */ html>body #breadcrumbs li { *background: url( /img/gt.gif ) no-repeat center right; *padding-right: 10px; *margin-right: 5px; } html>body #breadcrumbs li.current { background: none; padding-right: 0px; } </style> <ol id="breadcrumbs"> <li><a href="/">Home</a></li> <li><a href="/lorum">Lorum</a></li> <li class="current">Ipsum</li> </ol>