Need some simple HTML help.

January 22nd, 2020

Hi, I am currently designing a website. When the user clicks on a link, another page pops up.
The problem is, when it pops up, it resizes automatically to the size I want but has a white space at the top and left of the page. Does anyone know how to get rid of it?
Heres the problem:
Image
Heres my CSS:
div#bg   {
   margin-top:0px;
   margin-bottom:0px;
   margin-left:0px;
   margin-right:0px;
   padding-top:0px;
   padding-bottom:0px;
   padding-left:0px;
   padding-right:0px;
   background-image:url(bg.png);
   background-repeat:no-repeat;
   height:300px;
   width:500px;
   font-family:Verdana, Arial, Helvetica, sans-serif;
   font-size:14px;
   color:#FFFFFF;
   font-weight:bold;
   float:none;
}

You can see making margin and padding 0px doesnt work.
Thanks in advance!

Answer #1
You need to change the margins for the body of the document.

body {
margin: 0px;
}

Answer #2
Thanks a lot.
Answer #3
no problem!

 

| Sitemap |