Hello.
I'm trying to make an page (with some tables on it) wich will use different styles if screen resolution of an visiting client is different.
Now, I know how to determine users screen resolution (via Javascript - screen.width etc), but don't know how to make an css file containing table styles and then include it in table's styles on my main page (the page that will the accordingly display desirable css style for table).
E.g. I want my table to be wide 768pix if sreen width is 800pix and less and table to be wide 1000pix if screen width is 1024pix wide.
How to acomplish this with css? Is it possible at all?
I have two css files: m1.css (800×600) and m2.css (1024×768) (will add others when I find solution how
).
I have this line of code for proper css file selection (Javascript):
(begin code)
document.writeln('<link href=m'+n+'.css rel="stylesheet" type="text/css">');
(end code)
WHERE n = 1 FOR screen 800×600 and n = 2 FOR screen 1024×768 pix;
When my main page is loaded, style is properely applied, but don't know how to make an style for table.
Thanks for any suggestions!
I'm trying to make an page (with some tables on it) wich will use different styles if screen resolution of an visiting client is different.
Now, I know how to determine users screen resolution (via Javascript - screen.width etc), but don't know how to make an css file containing table styles and then include it in table's styles on my main page (the page that will the accordingly display desirable css style for table).
E.g. I want my table to be wide 768pix if sreen width is 800pix and less and table to be wide 1000pix if screen width is 1024pix wide.
How to acomplish this with css? Is it possible at all?
I have two css files: m1.css (800×600) and m2.css (1024×768) (will add others when I find solution how
I have this line of code for proper css file selection (Javascript):
(begin code)
document.writeln('<link href=m'+n+'.css rel="stylesheet" type="text/css">');
(end code)
WHERE n = 1 FOR screen 800×600 and n = 2 FOR screen 1024×768 pix;
When my main page is loaded, style is properely applied, but don't know how to make an style for table.
Thanks for any suggestions!