views:

25

answers:

1

I want to replace all font-size-parameters in a html document (css attributes). I'm using .net with c#. I guess it could be done with some regular expression.

Am I forgetting some other ways to set the font size?

Example:

<html>
    <head>
        <style type="text/css">
             .t {
                 font-size: large;
             }
        </style>
    </head>
    <body>
        <span style="font-size: medium" />
    </body>
</html>

into:

<html>
    <head>
        <style type="text/css">
             .t {
                 font-size: large_replaced;
             }
        </style>
    </head>
    <body>
        <span style="font-size: medium_replaced" />
    </body>
</html>
A: 

if you use relative unit like em, ex etc for all font dimensions in your page. By adjusting only html elements' size you manage all fonts

big fonts

html{
 font-size:18px;
}

smaller fonts

html{
 font-size:18px;
}

you can manage that form javascript, better (also using cookies).

nerkn
But I want to replace them :)
Andreas