Zum Inhalt springen

Bildschrimauflösungsabhäniges CSS

Erstellt am 8. Dezember 2010 · 1 Antwort · letzte Antwort am 8. Dezember 2010

Tags: HTML & CSS, Frage

Cubana13 ·

Ich möchte gerne ein Bildschrimauflösungsabhäniges CSS.

Aber wie binde ich das per TS ein.

Stell mich gerade etwas blöd an.
Mein Ansatz war...

Bitte um Unterstützung.

Vielen Dank

page {
  // Das CSS File zugewiesen
  bodyTag = <body>
 
  /*
  includeCSS.file1 = {$filepaths.css}stylesheet.css
  includeCSS.file1.media = screen,projection
  includeCSS.file1.title = Standardansicht
  */  
  
  headerData.5 = TEXT
  headerData.5.value (
  <script type="text/javascript">
		if (screen.width == 800) {
		document.write('<link rel="stylesheet" type="text/css" href="{$filepaths.css}stylesheet.css">') ;
		alert("StyleSheet für 800 x 600 wird geladen." ) ;
					}
		else if (screen.width == 1024) {
		document.write('<link rel="stylesheet" type="text/css" href="{$filepaths.css}stylesheet1.css">') ;
		alert("StyleSheet für 1024 x 768 wird geladen." ) ;
						}
		else if (screen.width == 1280) {
		document.write('<link rel="stylesheet" type="text/css" href="{$filepaths.css}stylesheet2.css">') ;
		alert("StyleSheet für 1280 x 960 wird geladen." ) ;
						}
  </script>

)

}