How to place an image next to each other in a gallery?

Asked

Viewed 1,172 times

2

I am creating a gallery on my site using html and formatting in css, I put each image in a div and used the tag float so that in the gallery view one image would be next to the other. But this getting a "white" space. Below follows my css formatting:

.galeria-foto {
    background: #ffffff;
    width:265px;
    height:250px;
    float:left;
    margin:25px;
    padding: 10 auto;
}
  • 2

    That blank space is probably because of margin:25px;. You can join HTML to see the problem live?

  • The problem was in the external spacing. It has been solved, thank you.

1 answer

1


This is probably happening because of the external spacing between Ivs. Try changing the value of the margin and test attribute to see if the problem will be solved. Ex: margin:20px;

  • Thank you very much, that was the problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.