[css tips] targetting chrome only browser - css chrome hacks
hi all some times you face problems in css adjustment and many differents between browsers
you can use SSI to target only IE browser but if you want to target Chrome you will have a serious issue here because there is no street way to do that
you can use some css hacks like:
1-:
2-
and also you can target it via javascript
thanks all see you in next tip
you can use SSI to target only IE browser but if you want to target Chrome you will have a serious issue here because there is no street way to do that
you can use some css hacks like:
1-:
body:nth-of-type(1) div.divname{width:500px;}
2-
@media screen and (-webkit-min-device-pixel-ratio:0) {
div.divname{width:500px;}
}
and also you can target it via javascript
<script type="text/javascript">
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(is_chrome){
document.write('<link rel="stylesheet" href="css/chrome.css" type="text/css" />');
}
</script>
thanks all see you in next tip