Answer the question
In order to leave comments, you need to log in
Is there a separate top property for chrome, mozilla and ie?
There is such code
.view a:hover:after{
content:'';
position:absolute;
background: #fff url(../images/viewbg2.png) no-repeat center center;
top:-1px;
left:87px;
width:42px;
height:70px;
z-index:-1;
}
The problem is that the position of the background differs by 1 pix in chrome from other browsers.
Is it possible somehow to make a separate top property only for chrome ?
Answer the question
In order to leave comments, you need to log in
can. on your page (page or index or whatever) you write:
<?php
$chrome = strpos($_SERVER["HTTP_USER_AGENT"], 'Chrome') ? true : false;
?>
is how we define a browser.
and then in php (or html, depending on what the site is on) we make an if condition:
<?php if ($chrome) { ?>
< div class="style_for_chrome">
<?} else {?>
< div class="style_not_for_chrome">
<? } ?>
ваш контент
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question