wanna get more space between my anchors (a)

dunno with wich css words i need to do it
No description
6 Replies
timo
timoOP11mo ago
like want some space between each link for readability
Neσ许
Neσ许11mo ago
Line height can work on that or padding/margin Maybe use gap property too
Tok124 (CSS Nerd)
keep in mind, anchor tags are inline elements, paddings and margins and stuff wont work as expected, you need to also add display:block; But yeah, you can space it out using padding-block:5px; for example, or margin-block:5px; Try this
a {
display:block;
padding-block:5px;
}
a {
display:block;
padding-block:5px;
}
This should work padding-block is a logical property and it will add padding on top and bottom
clevermissfox
clevermissfox11mo ago
FYI to use gap you would need to declare display: grid or display: flex; flex-direction: column; on the parent of the links , then you would be able to assign a gap on the parent to space out the children.
reddogg476
reddogg47611mo ago
I like ems as a spacing measurement, like this:
CSS
a {
display: inline-block;
padding-block: 2em;
}
CSS
a {
display: inline-block;
padding-block: 2em;
}
Kevin has mentioned in his videos that changing the display attribute changes the style behavior. Normally, anchor tags are 'display: inline', which, inline doesn't let block spacing (the space above/below elements) change.
timo
timoOP11mo ago
thx fixed🟩
Want results from more Discord servers?
Add your server