+ 2
Help me ?
I am making a website about the earth. Everything seems to be okay but the space between the <div> element can't be fixed. See my website code in my codes . Then you will know. There is a horizontal gap between two div . How to fix it???
3 Respostas
+ 8
Soubhagya Ranjan It appears the <p> is creating the space have you tried replacing it with a <div> ?
after that I'm still trying to figure it out but adding a nice blue background color in the CSS body was an easy fix lol.
+ 7
That is a common problem, but it is easily solved. Change the CSS rules of your div for something like this:
div {
/ * In your code you have a margin-bottom that can cause problems * /
margin: 0;
/ * Changes the way in which the div are treated, in this way they respect the width, the height and the vertical margins */
display: inline-block;
/ * Small Hack to keep the images centered * /
text-align: center;
}
+ 6
for a paragraph <p> tag browser automatically add some white space to display content decently... ref:-w3schools.com.
so removing the <p> element may help..