Home >Web Front-end >HTML Tutorial >The page img has a gap problem_html/css_WEB-ITnose
Is it a problem with the picture? Give the picture brother a try with width and height
Use firebug to see if other settings are inherited. It should be the priority. Question
You add the sentence float:left; in #main_div_log02 img{padding:0;margin:0;border:0;} and change it to #main_div_log02 img{padding:0;margin:0;border :0;float:left;}, in this case the gap between the pictures will be gone!
If you don’t want to float, you can write img on one line, just don’t press enter.
There should be no carriage return space between
There should be no carriage return space between
Dizzy! Carriage return and line feed in code are useless!
If you don’t want to float, you can write img on one line, just don’t press enter.
Have you tried it? Don't talk nonsense. What's the difference between putting it on one line and putting it on several lines? it's useless!
It is useful to write all the characters on one line without adding a carriage return.
There is something wrong with LZ’s attitude. I must have a certain reason for saying this.
I remember that I encountered a similar problem before, and then I just wrote it in one line.
LZ, you are here to ask others to help you solve your problem. How do you know it doesn’t work if you haven’t tried it? You just take it for granted that it doesn’t work.
Then why are you asking? ? ? ?
If you have tried it and the method I said does not work for your problem, you can say it, but not in this tone!
LZ, let’s go back and learn how to behave!
Quoting the reply from danica7773 on the 4th floor:
If you don’t want to float, you can write the img in one line, just don’t press enter.
Have you tried it? Don't talk nonsense. What's the difference between putting it on one line and putting it on several lines? it's useless!
Even if someone else’s reply is wrong, don’t use this tone of voice
Add border to the img style and take a look
Generally, img{padding:0;margin:0;border: is added at the beginning of the style sheet. 0;}, and then set it up separately when you need to add these.
Khan. . . On the #9th floor. It wasn’t me who replied. . . I have no problem with my attitude.
Solved it myself. Thank you anyway.
is placed inside ul li and the width and height of li must be defined. I referred to the css of Xunlei Kankan
Indeed, this problem still exists. There is almost 3 pixels of space under Firefox, but there is no space under IE7 and 8.
This is because there is a gap when div and img are combined.
To solve this problem, just write this
#main_div_log02{width:960px;height:186px;margin-top:5px;}
#main_div_log02 img{padding:0;margin: 0;border:0; display:block;}
This is indeed the case. I tried it and it solved it! Thank you!
Please add this float:left; to #main_div_log02 img{padding:0;margin:0;border:0;} and change it to #main_div_log02 img{padding:0;margin:0;border:0; float:left;}, in this case the gap between the pictures will be gone!