Jump to content
php.lv forumi

Browser dependent...


Robis

Recommended Posts

Nu!

Taisiiju maajaslapu css + html + php (bet tas shoreiz laikam nebuus noziimiigaakais - php). Visu laiku skatiijos uz Mozilla browseri, peekshnji apskatos ieksh Internet Explorer 6 - uzpeld visaadi briinumi, kas attiecas uz formateeshanu - "*" ziimi tabulu platumu, garumu formateeshana IE saprot laikam nepareizi! Radaas arii probleemas ar tabulu shuunu formateeshanu (neliels JavaScript, kas nosaka to)! IE nesaprot, ko noziimee onmouseout, man taa sanaak laikam! Vai ir par tieshi shiim probleemaam kaadi risinaajumi - lai visi browseri to saprastu pareizi???

Edited by Robis
Link to comment
Share on other sites

Attiecībā uz JavaScript un CSS ir šādi:

 

Ir rindinja: <td id='linktd' onmouseover='mover(this);' onmouseout='mout(this);' class='linkiTable'>

class linkiTable ir klase, kaadai jaaizskataas tabulai ielaadeejot lapu vai arii onmouseout - nu taa kaa defaults. Luuk klase:

.linkiTable {

background-color: #E9EAF2;

padding-bottom : 3px;

padding-left : 4px;

padding-right : 4px;

padding-top : 3px;

text-align : left;

border-top: 2px solid #C2C6D9;

border-left: 2px solid #C2C6D9;

border-bottom : 2px solid #7781A6;

border-right : 2px solid #7781A6;

}

 

Un luuk attieciigaas Js funkcijas:

 

function mover(what) {

// tmpXXX ir ieprieksh nodefineeti, tukshi mainiigie, kurus izmanto, lai saglabaatu

// esoshos parametrus

tmpColor = what.style.backgroundColor;

tmpTop = what.style.borderTop;

tmpLeft = what.style.borderLeft;

tmpBottom = what.style.borderBottom;

tmpRight = what.style.borderRight;

what.style.backgroundColor = '#FCC488';

what.style.borderTop = '2px solid #FEE4C8';

what.style.borderLeft = '2px solid #FEE4C8';

what.style.borderBottom = '2px solid #A27647';

what.style.borderRight = '2px solid #A27647';

}

 

function mout(what) {

// funkcija nomaina atpakal vecos uz vecajiem parametriem, kas glabaajas

// mainiigajos tmpXXX

what.style.backgroundColor = tmpColor;

what.style.borderTop = tmpTop;

what.style.borderLeft = tmpLeft;

what.style.borderBottom = tmpBottom;

what.style.borderRight = tmpRight;

}

 

Rezultāts!

 

IE 6 ielaadeejot raada pareizi, onmouseover pareizi, tachu onmouseout - paraadaas bez borderiem, vienkraasaini - truukst border width un vecie border color - vienuvaardusakot - borderstili!

 

Mozilla visu ir pareizi sapratis un raada kaa vajag!

 

Varbuut ka risinaajums ir vienkaarsh, bet neesmu to atradis... :unsure:

 

Tagad par html nesaprashanos!!!

 

Koda saakums ir shaads:

"<table align="center" border="0" width="780" cellpadding="0" cellspacing="0">

<tr>

<td width="257" height="100" valign="top" cellspacing="0"><img src="img/logo4.jpg" height="100" width="257"></td> ŠEIT

<td width="108" height="100" align="left" valign="top" cellspacing="0" cellpadding="0" bgcolor="#39487D"><img src="img/top1.jpg" height="100" width="108" border="0"></td>

<td width="*" height="100" align="right" valign="middle" bgcolor="#39487D" style="padding-right: 10px;">

<img src="img/foto.jpg" height="80" width="107" border="0"></td>

</tr>"

 

Rezultāts!!!

 

Mozilla, protams, visu ir sapratis pareizi un raada kaa jaaraada!!!

 

IE 6 raada tukshumu vienaa vietaa, kas noraadiita ar sarkaniem burtiem sheit kodaa, lai gan taam divaam tabulas shuunaam jaabuut cieshi kopaa, arii platumi ir pareizi!!!

Link to comment
Share on other sites

×
×
  • Create New...