Tuesday, 15 May 2012

html - Image bring front using css -



html - Image bring front using css -

i using below code view product id. using background image each list. want bring image front end , text go back.

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> <style type="text/css"> .addcart { } .addcart ul{ list-style:none; } .addcart li{ list-style:none; background-image:url(round.png); background-repeat: no-repeat; height:45px; top:0px; } .addcart h3 { font-size:24px; font-weight:bold; padding:10px 0px 40px 10px; color:#f00; z-index:400px; position:relative; } </style> </head> <body> <ul class="addcart"> <li><span><h3>96</h3></span></li> <li><h3>97</h3></li> </ul> </body> </html>

if want hide text, this:

.addcart h3 { position : absolute; left : -9999px; }

demo: http://jsfiddle.net/pfmhr/

html css css3

No comments:

Post a Comment