This is a migrated thread and some comments may be shown as answers.

Buttons with style display:block render both the orriginal button and a styled button

1 Answer 140 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Ryan Means
Top achievements
Rank 1
Ryan Means asked on 22 May 2009, 03:10 PM
I have a css class that sets the style display:block on all buttons inside a div so that the buttons stack on top of each other instead of side by side.  When I also have the RadFormDecorator styling buttons, both the unstyled input button and the styled button appear.

<div class="VerticalButtonList">  
    <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" Width="60px" /> 
    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" Width="60px" /> 
    <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click" Width="60px" /> 
</div> 
.VerticalButtonList input[type=submit]  
{  
    display:block;  

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 25 May 2009, 08:25 AM
Hi Ryan Means,

Applying display:block over a decorated element will break its styling, because in order to style the controls, RadFormDecorator hides the original ones.
In scenario like yours, I suggest to use BR tags with style=clear:both for achieving the same effect:

<asp:Button ID="btnSave" runat="server" Text="Save" Width="60px" /> 
<br style="clear: both" /> 
<asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="60px" /> 
<br style="clear: both" /> 
<asp:Button ID="btnDelete" runat="server" Text="Delete" Width="60px" /> 


All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
FormDecorator
Asked by
Ryan Means
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or