Search code examples
cssinternet-explorerfirefoxalignment

How to set two values for one css property?


I set a div style programicaly like below:

oDiv.Style.Add("text-align", "center");

it works in IE ,But not in FireFox,

for FireFox I must write this one:

oDiv.Style.Add("text-align", "-moz-center");

How could I have both?because if I write both ,just the second one works, please help me.


Solution

  • thanks All.finally I could solved it with this :

    .newClas{
       text-align: -moz-center;
       #text-align: center;
    }
    

    the # sign must be before next line in the css class