Issue
right now my div looks like this:
.codeText{
background-color: #2C3E50 ;
color: white;
display:inline-block;
border-radius: 25px;
}
when I use it on a <p>
like this:
<div class="codeText">
<p> <code><p>This is a paragraph </p></code></p>
</div>
The output looks like this:
What I want is for there to be a little gap between the text and the background. (gaps on the red arrows shown on the screenshot)
edit: I want to implement this into the .codeText{}
and not inline so I can use in multiple areas
Solution
You could add some padding and width to the codeText
.codeText {
background-color: #2C3E50;
color: white;
display:inline-block;
border-radius: 25px;
padding-inline: 10px;
}
<div class="codeText">
<p> <code><p>This is a paragraph </p></code></p>
</div>
Answered By - Totigamer 2004
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.