html - CSS - individual background-image -
html - CSS - individual background-image -
this question has reply here:
background-image within div not showing up 2 answersi have next html code:
<div class="avatar"></div>
... , next css:
.avatar { background: url(img.png) no-repeat; background-position: 2px 5px; }
but image won't show. how can prepare this?
(and yes, searched years answer, nil found.)
my entire code:
<body onload="countdown()"> <div class="avatar"></div> <img src="..." class="logo" /> <div id="box"><b><u><?php echo $titel; ?></u></b> <br /><br /> <?php echo $text1; ?><br /><br /> lorem ipsum.. <span id="countdown" style="color: white"></span>lorem ipsum..<br /> </div> </body>
your div doesn't have width or height, that's why won't show background image, seek giving width & height,
.avatar { background: url(img.png) no-repeat; background-position: 2px 5px; width:500px; height:500px; }
if doesn't work, there's wrong image link.
html css
Comments
Post a Comment