Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów
Tło w css dla IE 6+ - Wersja do druku

+- Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów (https://www.webmastertalk.pl)
+-- Dział: Technologie internetowe - tworzenie stron WWW (https://www.webmastertalk.pl/forum-technologie-internetowe-tworzenie-stron-www)
+--- Dział: Początkujący webmaster (https://www.webmastertalk.pl/forum-poczatkujacy-webmaster)
+--- Wątek: Tło w css dla IE 6+ (/thread-tlo-w-css-dla-ie-6)



Tło w css dla IE 6+ - mariusz__vip - 08-04-2014

Witam serdecznie,
chciałbym zrobić w css kolor tła dla sekcji który będzie pokazywany tylko w IE6+. W innych przeglądarkach kolor ten będzie pomijany.


RE: Tło w css dla IE 6+ - Engine - 08-04-2014

Kod PHP:
<?php
preg_match
('/MSIE (.*?);/'$_SERVER['HTTP_USER_AGENT'], $matches);
if (
count($matches)>1){
     
$version $matches[1];
     if(
$version 6) {
         
// umieść co chcesz dla IE6+
     
}
}
?>

bez php
Kod:
<!--[if gte IE 6]>
umieść co chcesz dla IE6+
<![endif]-->



RE: Tło w css dla IE 6+ - Kartofelek - 12-04-2014

Ale to dobrze, bo wtedy dajesz tlo dla ie6 a potem nadpisujesz to innym tlem dla reszty.
Można też tak:
http://stackoverflow.com/questions/9265532/ie-and-html5-doctype-issues