PDA

Zobacz pełną wersję : tło a rozdzielczość



thc
30-12-2010, 15:15
Jak zrobić, aby tło strony dopasowywało się do rozdzielczości monitora? Żeby rozciągało się w poziomie.. repeat-x nie wchodzi w gre ze względu na obrazek.. próbowałem też coś takiego umieścić w <head> ale też nie działa :

<style type="text/css">
/* pushes the page to the full capacity of the viewing area */
html {height:100%;}
body {height:100%; margin:0; padding:0;}
/* prepares the background image to full capacity of the viewing area */
#bg {position:fixed; top:0; left:0; width:100%; height:100%;}
/* places the content ontop of the background image */
#content {position:relative; z-index:1;}
</style>
<!--[if IE 6]>
<style type="text/css">
/* some css fixes for IE browsers */
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bg {position:absolute; z-index:-1;}
#content {position:static;}
</style>
<![endif]--> Ma ktoś jakiś pomysł?

---------- Post dodany o 15:15 ---------- Poprzedni post był o 14:21 ----------

Poradziłem sobie.. rozszezyłem obrazek do 1700px.. wycentrowalem i przymocowalem scroll - dla potomnych