![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 135 Pomógł: 0 Dołączył: 1.08.2005 Ostrzeżenie: (0%) ![]() ![]() |
Cześć
Ostatnio postanowiłem nauczyć się XHTML, i jakoś tam idzie. Złożyłem już stronę, nawet gładko poszło, ale właśnie mam taki problem, iż pod Operą wszystko wygląda b. dobrze a w IE to wogóle wszystko się rozlatuje :| Tu kod: (strona)
(css)
I screeny: Opera Internet Explorer Ten post edytował spit 27.11.2005, 19:26:37 |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 258 Pomógł: 16 Dołączył: 21.09.2004 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
Proponuję najpierw zopytmalizowanie cssa
![]() Kod //ustawiasz wartości margin i padding dla wszystkich elementow - nie trzeba osobno dla kazdego * { margin:0; padding:0; } //zamiast ustawiac paddingi i marginy osobno dla top,bottom,left,right mozna tak: padding: 0 5px 0 5px; -->(top,right,bottom,left), margin tak samo //border można ustawić prościej border-right: 15px solid #3F3D36; Nie musisz ustawiac np. float:none, bo domyślnie dla elementu jest już to już ustawione. Masz dużo niepotrzebnych rzeczy, np.z-index, visibility, text-transform, overflow po co to ? Ustawiasz width dla border, a potem jego styl na none, ta operacja nie ma sensu bo bordera nie będzie widać, a produkuje to tylko dodatkowy niepotrzebny kod css. Według mnie sprawa layoutu powinna być jeszcze raz przemyślana, bo są małe szanse żeby udało Ci się to zrobić w tej formie jaka jest. Wszechobecne paski przewijania po prostu zabiją tą stronę. Poprawiłem Ci to, nie wiem czy wszystko: Kod * { margin: 0; padding: 0; } body { background-image: url(images/bg.gif); } #content_up { height: 41px; width: 401px; } #content_main { width: 400px; text-align: justify; vertical-align: top; background-color: blue; } #main_div { margin: auto; width: 650px; border-right: 15px solid #3F3D36; border-left: 15px solid #3F3D36; background-color: red; } #left { width: 11px; float: left; } #menu { float: right; width: 205px; background-image: url(images/img_18.jpg); border-bottom-width: 1px solid #4C483F; background-color: green; } #menu_main { background-image: url(images/img_16.jpg); background-repeat: no-repeat; } #menu_up { height: 41px; width: 205px; } #odstep { float: left; width: 10px; } #content { float: left; width: 410px; background-image: url(images/img_19.jpg); border-bottom-width: 1px solid #4C483F; padding-bottom: 10px; } #right { float: right; width: 4px; } #forum_left { float: left; width: 17px; height: 149px; } #forum_bg { background-image: url(images/img_10.jpg); float: right; height: 149px; width: 382px; } #logo { float: left; height: 77px; width: 399px; } #navigator { float: right; width: 251px; height: 252px; } #nav_up { height: 34px; width: 251px; } #nav_back { background-image: url(images/img_07.jpg); height: 218px; width: 251px; text-align: center; vertical-align: middle; } #forum { float: left; height: 175px; width: 399px; } #forum_up { height: 26px; } #upper_menu { width: 650px; height: 70px; } .strzalka_imp { margin: 2px 0 2px 0; padding: 2px 0 2px 0; background-image: url(images/arrow.gif); background-repeat: no-repeat; background-position: 10px 4px; text-indent: 22px; font-weight: bolder; border-bottom: 1px dotted #5C5B52; width: 95%; border-top-width: 1px dotted #5C5B52; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } #footer { height: 50px; width: 650px; clear: both; vertical-align: middle; text-align: center; margin-top: 15px; padding-top: 15px; } img { border: 0px; } .link_button { background-repeat: no-repeat; border-bottom-width: 1px dotted #5C5B52; width: 95%; text-align: center; } .button_img { margin: 5px 0 5px 0; padding-top: 5px 0 5px 0; border-color: #5C5B52; } .screen_wideografia { margin: 5px; padding: 5px; } .punkt { background-image: url(images/arrow.gif); background-repeat: no-repeat; background-position: 2px 2px; text-indent: 14px; margin-bottom: 2px; padding-bottom: 2px; width: 95%; } td, div { vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #787669; } .strzalka { margin: 1px 0 2px 0; padding: 1px 0 2px 0; background-image: url(images/arrow.gif); background-repeat: no-repeat; background-position: 2px 3px; text-indent: 14px; border-bottom: 1px dotted #5C5B52; width: 95%; } a { color: #827260; text-decoration: none; }
-------------------- -------------
------ |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 135 Pomógł: 0 Dołączył: 1.08.2005 Ostrzeżenie: (0%) ![]() ![]() |
Dzieki wielkie za odpowiedz i zainteresowanie, ale to niestety nie to.. tzn. działa prawie że dobrze, ale wszystkie elementy sie posypały... Ogólnie to zauwazyłem, że pod IE między div'ami pojawiają się niepotrzebne odstępny... jak temu zaradzić?
|
|
|
![]() ![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 85 Pomógł: 0 Dołączył: 15.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
powinno pomoc
![]() Ten post edytował popo 28.11.2005, 17:40:39 |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 135 Pomógł: 0 Dołączył: 1.08.2005 Ostrzeżenie: (0%) ![]() ![]() |
No tak, z tym że ja, gdy mam padding, to zaznaczam różnicę w wymiarze div'a. Ale to przy dwóch czy trzech warstwach tylko, a dziś sklejałem strone od nowa, i w miejscach gdzie jeszcze nie wspominałem o paddingu były odstępy (linijka od linijki).
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 13.07.2025 - 01:44 |