Как мне всегда располагать изображения на расстоянии 2 пикселей друг от друга со всех сторон?CSS

Разбираемся в CSS
Ответить Пред. темаСлед. тема
Гость
 Как мне всегда располагать изображения на расстоянии 2 пикселей друг от друга со всех сторон?

Сообщение Гость »


The problem im having is that im not able to get all images to be 2px apart from eachother left, right top and bottom.
Изображение


I dont really know how to describe the problem much further. Sorry. I have no idea how to fix it, ive been trying for days but cant seem to get anything to work. I started coding 6 weeks ago so im not very good yet but im definitly trying my absolute best.

Here's my php code:

Image Gallery And here's my css code:

body.dark-mode { background-color: #333; color: #fff; } .container { width: 85%; margin: 0 auto; } .image-gallery { display: flex; flex-wrap: wrap; justify-content: space-between; } .image { width: 300px; margin: 2px; } img{ border-radius:10px; brightness:0%; } .pagination { margin-top: 20px; text-align: center; /* Aligning the pagination links to the center */ } .pagination a { text-decoration: none; color: #fff; margin: 0 5px; /* Adjusting margin for better visibility */ } .pagination a.current { font-weight: bold; /* Highlighting the current page */ color: yellow; /* Change color for better visibility */ } I have really tried as much as i can. I asked a friend to, chatgpt too but no-one could find it out.


Источник: https://stackoverflow.com/questions/781 ... -all-sides
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «CSS»