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

Positioning RadButton?

3 Answers 498 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
King Chan
Top achievements
Rank 1
King Chan asked on 22 Feb 2011, 05:02 PM
Hello,

When I try to position the RadButton with to the right with:

 

.RadButton_Right,
  
.RadButton_Right .rbDecorated
  
{
  
position: absolute;
  
width: auto;
  
right: 0px
  
}

it doesn't seems working, but it work fines with RadTextBox or other Asp Button, Asp TextBox, I wonder what's the proper way to do it?
Because I want to have few buttons on the left, and a another Button on the right...
Thanks

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Feb 2011, 06:20 AM
Hello King,

I suppose you are using the custom skin, and I am not quite sure about the styles that you have defined. If you are trying to override the styles from the page, try using the !important modifier.

Thanks,
Shinu.
0
Accepted
Bozhidar
Telerik team
answered on 23 Feb 2011, 10:30 AM
Hello King Chan,

I am not quite sure what you are trying to achieve, but the button has relative position and it is wrong to change it to absolute, just to move it to the left or to the right. A better solution would be to create a layout where the buttons will be on the right positions. The following code demonstrates two column layout and button in the left and right columns:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .flRight .RadButton
        {
            float: right;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sc1" runat="server">
    </asp:ScriptManager>
    <div style="width: 700px; margin: 0 auto; border: 1px solid #000; height: 300px;">
        <div style="width: 500px; height: 300px; float: left; background: #eee;">
            <telerik:RadButton ID="RadButton2" runat="server" Text="Left Button 1" Skin="Forest">
            </telerik:RadButton>
            <telerik:RadButton ID="RadButton3" runat="server" Text="Left Button 2" Skin="Forest">
            </telerik:RadButton>
            <telerik:RadButton ID="RadButton4" runat="server" Text="Left Button 3" Skin="Forest">
            </telerik:RadButton>
        </div>
        <div style="width: 200px; height: 300px; float: right; background: #ddd;" class="flRight">
            <telerik:RadButton ID="RadButton1" runat="server" Text="Right Button 3" Skin="Forest">
            </telerik:RadButton>
        </div>
    </div>
    </form>
</body>
</html>


Best wishes,
Bojo
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
King Chan
Top achievements
Rank 1
answered on 24 Feb 2011, 08:02 PM
that's works well.
I just thought I could just position RadButton like how I position the default Asp.Net Button, but oh well, it doesn't matter.
Thanks a lot :)
Tags
General Discussions
Asked by
King Chan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Bozhidar
Telerik team
King Chan
Top achievements
Rank 1
Share this question
or