Most voted "margin" questions
Margin is a CSS property used to generate space around one or more elements.
Learn more…9 questions
Sort by count of
-
35
votes6
answers24229
viewsWhat is the difference between padding and margin in CSS?
From what I understand I see a retreat from another element when defined the properties left, top, right e bottom. There is a difference between margin and padding in the CSS? An answer with…
-
2
votes2
answers1015
viewsWhy margin-top affects the father div
Because when I give a margin-top on the child element it affects the parent element? See example below: body{ background-color: #aaaaaa; } .topo{ width: calc(100% - 20px); max-width: 1200px; height:…
-
1
votes1
answer1231
views2 simple speakers with bootstrap
I have a simple question about bootstrap. I may lack some insight to understand the case. I even have some mastery over, but following these images: I know it’s a simple question, I know how to…
-
1
votes1
answer150
viewsHow do I margin between an image and an HTML list?
I tried that, but the ordered list is still pasted to the image ol { margin-left: 5px; } figure { margin-left: auto; margin-right: 20px; }…
-
1
votes0
answers69
viewsTouchableopacity problem, negative margin and Android - React Native
I have a problem with TouchableOpacity using negative margin so that different TouchableOpacities stay a little on top of each other (I’ll post an image to better understand). These buttons are…
-
0
votes1
answer735
viewsPosition Fixed mixing margin
When I set my header#header header as Fixed position, it took the style (for example the margin) of div.interface, I don’t understand why this happens, I want my div.interface to have…
-
0
votes2
answers4346
viewsHow to center and position side by side two images? html css
HTML: <div id="ladoalado"><img src="imgs/login.png"><img src="imgs/cadastro.png"></div> CSS: #ladoalado{ float: left; margin: auto; } Code image:…
-
0
votes1
answer20
viewsWhy `position: Sticky;` of an element stops working when it reaches the `margin-bottom` of the next element?
I’m doing an exercise in CSS and I have a header stylized with position: sticky. This style works correctly until the scroll of the page finds the margin-bottom of the next element (div), when the…
-
-2
votes2
answers164
viewsWhat is the difference between centering with "align-items: center" or "margin"?
I saw that it is possible to centralize a div or img with display:flex, align-items: center or with the margin. What is the difference between these two to centralize?…