can you have javascript in css file (ie main.css) as i have wrote a javascript to figure the size of border i want depending of the users screen size.
[tt]<SCRIPT language=JavaScript>
function getMargin() {
var Iwidth, Swidth, widthMargin;
Iwidth = "750";
Swidth = screen.width
widthMargin = (screen.width - Iwidth)/2
return widthMargin+'px'
}
</SCRIPT>[/tt]
and now i want to use the number generated in this javascript to use in my css.
does anyone have any ideas, or could i rewrite this in css
thanking you in advance rick
[tt]<SCRIPT language=JavaScript>
function getMargin() {
var Iwidth, Swidth, widthMargin;
Iwidth = "750";
Swidth = screen.width
widthMargin = (screen.width - Iwidth)/2
return widthMargin+'px'
}
</SCRIPT>[/tt]
and now i want to use the number generated in this javascript to use in my css.
does anyone have any ideas, or could i rewrite this in css
thanking you in advance rick