Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7565047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:03:05+00:00 2026-05-30T14:03:05+00:00

I am new in CSS so have a simple question. here is my script

  • 0

I am new in CSS so have a simple question.

here is my script =>

<!DOCTYPE html>
 <html>
 <head>
 <title>Default</title>
 <meta charset="UTF-8">
 <style type="text/css">
    body,div,html,img
    {
        margin: 0;
        padding: 0;
        border: 0;
    }
  </style>
  </head>
  <body>
      <div>
          <img src="/project/pics/5.jpg" width="240" height="200">
          <img src="/project/pics/10.jpg" width="240" height="200">
          <img src="/project/pics/10.jpg" width="240" height="200">
      </div>
   </body>
 </html>

So my question is that , despite of CSS reset between images are spaces, which of course cause some problems after styling layout, so anyone knows how to solve , how to reset CSS that there were not any spaces between images, Thanks …

I guessed lol, it is really very simple , just it must be written in one line , otherwise it must be declared font-size: 0;

Thanks all :))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:03:06+00:00Added an answer on May 30, 2026 at 2:03 pm

    The reason that happens is that the browser parses the linebreaks between images as spaces. Images are inline elements, and will have a literal space between them when a whitespace (or a linebreak) is used.

    To eliminate the problem, either float: left; on the images, or simply eliminate the line breaks (as in, put them all on the same line, with no spaces between the tags).
    Another solution is to set font-size: 0; on the parent, and then font-size: 16px; on the elements themselves.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am very new to css so this maybe a simple answer. I have
How to add new css class or id and then write properties for html
I'm new to html and CSS but through the recent work I've been doing
<html> <head> </head> <body> <div> <a href=http://www.google.com> <span>title<br></span> <span>description<br></span> <span>some url</span> </a> </div> </body>
I have a simple Tab Navigation with jquery. Whenever a new tab is clicked,
I'm writing some simple web apps in PHP/HTML/CSS/JS, and am looking for a way
Simple problem, though apparently not a simple solution. Example here: http://myhideout.eu/new/ Basically the site
I am a beginner and have a simple question - I am creating a
REVISED QUESTION (SEE BELOW FOR ORIGINAL): Here is an example of a simple ajax
I have a pretty simple question, but with an answer that I am unable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.