Probleme in IE6.Din nou...Se putea altfel?
Last Updated: Oct 09 2008 15:55, Started by
dtbd1916
, Oct 09 2008 08:23
·
0

#1
Posted 09 October 2008 - 08:23

Am codul urmator(am luat un exemplu cu putine linii de coduri ca sa simplific problema):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head><title>index</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head> <body bgcolor="#cccccc"> <div style=" width:600px; height:330px; border-width:medium; border:dashed; "> <!--left--> <div style=" float:left; width:300px; height:330px; border-width:medium; border:dashed; text-align:justify"> There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc. </div> <!--rigth--> <div style=" float:right; border-width:medium; border:dashed;"> <img src="images/acasa_images2.png" width="178" height="79"> </div> </div> </body> </html>Border`urile le`am pus ca sa iasa in evidenta bugul. Nu stiu de ce in IE6 si IE7 imi apare un spatiu in plus in josul textului ca in imaginea de mai jos: [ http://www.imagesl.info/uploads/ddb2f318070a20428d7da7b574e4780f.jpg - Pentru incarcare in pagina (embed) Click aici ] In Firefox pagina este afisata corect dupa cum se vede in imaginea de mai jos: [ http://www.imagesl.info/uploads/993d01f1d2555ef8b7cb392944605bc0.jpg - Pentru incarcare in pagina (embed) Click aici ] Ce trebuie sa adaug la cod ca in ambele browserele pagina sa se afiseze la fel? |
#2
Posted 09 October 2008 - 15:55

Am codul urmator(am luat un exemplu cu putine linii de coduri ca sa simplific problema): Ce trebuie sa adaug la cod ca in ambele browserele pagina sa se afiseze la fel? Pai nu e vorba de nici un bug. Tu nu ai aproape nici un fel de definitii css pe acolo, in afara de citeva inline. Ceea ce inseamna ca browserul va afisa elementele de pe pagina conform proprioului mod de randare, care este diferit de la un browser la altul. ca sa eviti asta si sa ai o prezentare cit de cit similara in orice browser, trebuie sa resetezi stilurile implicite ale browserelor. Pentru inceput, ai putea sa scrii *{margin:0;padding:0} body {font:normal 12px/1.4 helvetica, arial, sans-serif}Selectorul universal * anuleaza precum se vede toate margin-urile si padding-urile la TOATE elementele. A doua linie iti dai seama si singur ce face. Resetarea asta cu selectorul universal este foarte rudimentara, este numita si "unealta lenesului", daca guglezi dupa "reset css" o sa gasesti rezolvari mai elegante. |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users