html - CSS: background-image not aligned anymore if I change zoom -
if change zoom in browser, background image (the logo of website) positioned differently respect other elements of website.
i'm using:
background-image:url('tbs-logo.png'); background-repeat:no-repeat; background-position: 92% 22%;
i wondering if can keep aligned other elements, or should change html code instead add image tag.
thanks.
i think need specify elements width , height background image. have checked simple code:
<html> <head><title>test</title> <style type="text/css"> #con{ width: 500px; margin: 0 auto; } #img{ width: 120px; height: 80px; background: url('ja2.jpg') 92% 22% no-repeat; float: left; border: 1px solid #000; } </style> </head> <body> <div id="con"> <div id="img"></div> <div>text tekst dfasdf saasdf dsaf dsa fas df sadf ' f af dfa dsf ads f fa </div> </div> </body> </html>
when zoom it, image still free in it's position
Comments
Post a Comment