I need to move the border with the text. The CSS only moves the text not the border
.p-2{
border: 1px solid #D8DADA;
margin: 0 12px 0 0;
padding: 10px 0 8px 30px !important;
}
CodePudding user response:
Hi if you want to move the border with the text then you can use margin properties. The CSS margin properties are used to create space around elements, outside of any defined borders.
you can use padding for making space inside any defined borders and margin for outside borders.
CodePudding user response:
If I understand you correctly, you are trying to move the button elements in their entirety, and not just their contents. I'm assuming you want to move them to the right.
To do this, wrap the contents of the buttons in a div, and give that div margin-left:30px.
CSS
.button-container {
margin-left:30px;
}
.p-2{
border: 1px solid #D8DADA;
margin: 0 12px 0 0;
padding: 15px 0 8px 15px !important;
}
HTML
<div class='button-container'>
<button class='p-2'></button>
<!-- and so on.. --->
</div>