Chcę to wszystko zrobić tak by:
- Szerokość całego menu była zależna od szerokości kontenera, w którym się znajduje.
- Menu ustala marginesy (chyba wiadomo po co).
- Teksturowanie belki ma polegać na trzech plikach graficznych:
- l.png ma rozmiar 7 x 32 i jest lewym narożnikiem belki.
- m.png ma rozmiar 1 x 32 i jest rozciągane horyzontalnie.
- r.png ma rozmiar 7 x 32 i jest prawym narożnikiem belki.
Wiem, że mogę użyć jednego pliku graficznego do takiego menu, ale wtedy, gdy będę chciał zmienić rozmiar to będę musiał tworzyć nowy plik graficzny.
Wygląd mojej strony ma wyglądać tak, że po lewej będą takie menusy, po prawej i na środku, z tymże te na środku oczywiście będą większe - w nich będą artykuły, recenzje i takie tam.
Tak więc muszą się one bezproblemowo rozciągać automatycznie w poziomie zależnie od kontenera, w którym je umieszczę.
Oto moje wypociny:
Plik html (menu na divach, na tabeli, i na dwóch tabelach):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta name="robots" content="noindex, nofollow"> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Language" content="pl"> <link rel="stylesheet" href="n.css" type="text/css"> </head> <body> <div class="menu"> <div class="h"> </div> <div class="c"> </div> </div> <table cellspacing="0" cellpadding="0" class="menu"> <tr> <!-- Jeśli tytuł będzie dłuższy, to IE 6 wyświetli to poprawnie... --> </tr> <tr> <td colspan="3" class="c"> <!-- Jeśli treść będzie krótsza, to IE 6 wyświetli to poprawnie... --> </td> </tr> </table> <table cellspacing="0" cellpadding="0" class="menu"> <tr> <td> <table cellspacing="0" cellpadding="0" style="width: 100%"> <tr> </tr> </table> </td> </tr> <tr> <td class="c"> </td> </tr> </table> </body> </html>
Arkusz stylów:
body { margin: 0; background-color: #fff; font-family: Verdana, Tahoma; font-size: 11px; color: #000; } a:link, a:active {color: #000; text-decoration: none} a:visited {color: #194b66; text-decoration: none} a:hover {color: #1e5c7d; text-decoration: underline} /* DIV-y */ div.menu {width: 100%} div.menu div.h {width: 100%; height: 32px} div.menu div.h div.l { float: left; width: 7px; height: 32px; background: red url('gfx/l.png') top left no-repeat; } div.menu div.h div.m { float: left; height: 32px; width: 100%; background: url('gfx/m.png') top left repeat-x; line-height: 32px; text-align: left; color: #fff; font-weight: bold; } div.menu div.h div.r { float: left; width: 7px; height: 32px; background: url('gfx/r.png') top left no-repeat; } div.menu div.c { background-color: #f0f9ff; } /* Tabele */ table.menu {width: 175px} table.menu td.l { width: 7px; background: red url('gfx/l.png') top left no-repeat; } table.menu td.m { height: 32px; background: url('gfx/m.png') top left repeat-x; line-height: 32px; text-align: left; color: #fff; font-weight: bold; } table.menu td.r { width: 7px; background: url('gfx/r.png') top left no-repeat; } table.menu td.c { background-color: #f0f9ff; border: 1px solid #065fa1; }
Screen jak to wygląda w IE 6 (WinXP SP3):

Wszystkie pliki:
http://www.sendspace.com/file/4hzrs9