css - Image fit to window -
i wanted fit image (galeria.jpg) window adds scrolling panel @ bottom , border on menu. shouldn't go this... html code:
<body> <div class="tlo"> <div class="logo"> <img src="logo.jpg" /> </div> </div> <div class="galeria" > <img src="galeria.jpg" /> </div> <div class="menu"> <ul> <li><a href="link">strona gŁÓwna</a></li> <li><a href="link">kontakt lokalizacja</a></li> <li><a href="link">zakres czynnoŚci notariusza</a></li> <li><a href="link">opŁaty w kancelarii</a></li> <li><a href="link">przydatne informacje</a></li> </ul> </div> </body>
css:
body { background-color:#ffffff; padding:0px; margin:0px; } .logo{ position:absolute; margin-left:-400px; left:50%; } .tlo{ height:230px; width:100%; background: #e0e0e0; } .galeria{ width:100%; }
jsfiddle: http://jsfiddle.net/sfg3a/
try this
.galeria img{ width:100%; // remove , add below style max-width:100%; vertical-align:bottom; // remove white space below image }
when give width 100%
takes width of image , when give max-width restricts image have maximum width of parent element.
Comments
Post a Comment