• I have problem with Css. I would like to use two Cssclass in one control like label or textbox or any control. But i dont know how to do it . Can any body please help me to solve this problem.
    Another is,
    I have one Css in which i have Cssclass for Datagrid and i also have Universal selector in which i had declared font size and name. Same thing i had applied in Datagrid CssClass. Now when i applied Datagrid class it works perfectly except font name and size. It uses font name and size from Universal selector ( * {font-family: arial; font-size: 10pt; text-align:justify; }) so how do come up with this problem.

    Datagrid Cssclass is like

    .DataGridHeader {color:black; background-color:Silver; font-weight:bold; font-size:10pt;}
    .DataGridFooter {color:black; background-color:#ffffff;font-size:10pt;}
    .DataGridItem {color:black; background-color:#F7F7F7; font-family:Arial; font-size:10pt; }
    .DataGridAltItem {color:black; background-color:#ffffff; font-family:Arial; font-weight: lighter ;font-size:10pt; }
    .DataGridPager {color:black; background-color:#ff99cc;font-size:10pt;}
    .DataGridSelected {color:black; background: #ffc8bc; font-weight: lighter;font-size:10pt;}
    .DataGridEdit {color:Blue; background: Gainsboro; font-weight: lighter;font-size:10pt;}
    .DataGridButton {color:black;}
    .DataGridButton:Hover {color:Blue;}
    .DataGridItemHighlighted {color:#b22222; }
    .DataGridAltItemHighlighted {color:#b22222; background-color:#B0C4DE;font-size:10pt;}

    Please help me to solve this problem

Viewing 5 replies - 1 through 5 (of 5 total)
  • To use 2 or more css class in one HTML tag. You just need put these class into the class attribute of the tag, seperated by a space. Eg:
    <input …. class=”class1 class2″ />

    In your second problem, i can’t understand how you uses these css, please post your HTML source somewhere, so i can easily check the source and can help you.

    QKhoi,
    Lensecap

    Thread Starter kshama

    (@kshama)

    Hi qkhoi,

    I have tried your code but its not working . It basically creating input box. but if i want two Css in label then what i have to do ?
    I wrote
    <input class = “class1,class2”> Testing

    so creating one input box which i dont want to do. I want to used two Cssclass in one control not using input. Can you tell me another way.

    And i have solved my second problem.

    Thank you.

    Take out the comma…
    It should be
    <input class="class1 class2">

    This is only an example, you not need to do with the input, you can using this with any other HTML tags. But remember, don’t use the comma, just a space between 2 CssClass

    Thread Starter kshama

    (@kshama)

    tham you ,
    it works…

    thank you very much

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to use two Css class in one Label ot textbox or any control’ is closed to new replies.