html - force div in full screen inside another div -
the code below shows image in image1 seems has little border on sides not going on left , top of page. can help me out how? in advance.
<html> <head> <style> body { background-image: url('images/main.jpg'); background-repeat: no-repeat; background-size: 100% 100%; border-style: none; } .container { width: 100%; height: 100%; } .image1 { background-image: url('images/freero1.png'); background-repeat: no-repeat; width: 100%; height: 100%; } </style> </head> <body> <div class="container"> <div class="image1"> </div> </div> </body> </html>
you can utilize little css code, remove default browser margin elements in page (including body):
*{ margin:0; } you can larn more asterisk selector here.
html css
No comments:
Post a Comment