I am showing my code first
<div class = "buttonsHolder">
<asp:Button runat = "server" ID = "btnAdd" Text = "Add New" CssClass = "buttonUserControl" />
<div class = "horizontalSpace"></div>
<asp:Button runat = "server" ID = "btnEdit" Text = "Edit" CssClass = "buttonUserControl" />
<div class = "horizontalSpace"></div>
<asp:Button runat = "server" ID = "btnDelete" Text = "Delete" CssClass = "buttonUserControl" />
</div>
My CSS is
.buttonsHolder
{
height:25px;
width:465px;
border: solid 1px;
}
.horizontalSpace
{
width:20px;
float:left;
}
.buttonUserControl
{
width:105px;
height:24px;
}
But the horizontalSpace is not working, no matter how much width I have given
One more thing to add, I am not good at HTML CSS. can be an option to keep spaces between buttons but what is wrong with my CSS, and how can I fix it without ` ?
if you just want horizontal space between your buttons, put a margin-right on them instead of putting divs between them.
in your .buttons class put