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

Line Breaks before and after RadRating control

1 Answer 41 Views
Rating
This is a migrated thread and some comments may be shown as answers.
Scott Hannon
Top achievements
Rank 1
Scott Hannon asked on 06 Apr 2012, 03:14 PM
Why is RadRating always displayed with a line break before and after the control? I tried using the AjaxManager and setting the rendering mode to inline, but it had no affect. Is there any way around this? Maybe it's simple and I've just missed it?

Thanks,
Scott

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 09 Apr 2012, 12:31 PM
Hi,

As the RadRating is wrapped into a DIV element, which is a block level element, they are displayed in a column and not i a row - when you have several DIV elements on the page.

In order to make them to appear next to each other, you have to use CSS to change the display block property to display: inline-block. The following sample code demonstrates it:

<%@ 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">
    .RadRating
    {
        display: inline-block;
        *display: inline;
        zoom: 1;
    }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server" />
     
        <telerik:RadRating ID="RadRating1" runat="server" ItemCount="5"
            Value="3" SelectionMode="Continuous" Precision="Half" Orientation="Horizontal"
             Skin="Default"
         />
     
        <telerik:RadRating ID="RadRating2" runat="server" ItemCount="5"
            Value="3" SelectionMode="Continuous" Precision="Half" Orientation="Horizontal"
             Skin="Default"
         />
     
     
    </form>
</body>
</html>


All the best,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Rating
Asked by
Scott Hannon
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or