Customising HTML elements

2 posts, 0 answers
  1. Marcel
    Marcel avatar
    1 posts
    Member since:
    Sep 2010

    Posted 03 Sep 2010 Link to this post

    Hello people from Telerik world!

    This is my first steps with this amazing tool and I'm so impressed with its power, flexibility and documentation...
    I've been learning ASP.NET and C# since 6 months ago...

    I'm working in a draft based in '' for an Outlook-like application and the customer wants a combo to choose what skin he wants to see and for this, I was using this example.

    I'm facing another problem: In this application, I have another HTML elements like headers (using divs), titles (using h1, divs and spans) that makes part of the visual identity of the application, but when I change the skin, for example, I would like that the header and titles, uses the same color from the current skin.

    How can I do that?

    I thought in create classes like .Header_Windows7, .Header_Black, .Header_Vista and so on in an external stylesheet used in the application, but how I should apply this for a div, for example?

    Exists something like the following?

    <div id="header" class="Header_<%= ??? %>">


  2. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 03 Sep 2010 Link to this post

    Have you checked out the RadFormDecorator by any chance to style those elements automatically?  They should allow your overall theme to match...

    Otherwise, what about this...Set the current skin value as a class on one of your main divs.  So then in your CSS you can say

    .Vista h1{
    .Outlook h1{

    So just put a runat="server" on your wrapper so you can get at it in Page_Load

    <div id="wrapper" runat="server">
        ...Controls go here...

    So when the page renders it'll do something like this

    <div id="wrapper" class="Vista">
        ...Controls go here...

  3. DevCraft R3 2016 release webinar banner
Back to Top