코드/Html & CSS

[cross] 브라우저별 css 핵 선택자

Yeah-Panda 2013. 11. 6. 15:20


legend{position:relative;left: -7px;}


ie 7에서 legend 가 7픽셀만큼 들여써지는 버그 픽스


실제로 사용했던 예


legend{display: block;margin: 0;padding: 0;position: absolute;left: 20px;*left: 13px;top:20px;font-size: 1.3em;font-weight: bold;}





각 브라우별  css 핵 마크



IE6 and IE7 are the bastards of the web design world. We all know it. IE6 more so.

To get around the inadequacies and bugs of IE6 and IE7, I see people going to great lengths and even adding a second stylesheet with conditional comments when we all preach at the same time to minimize HTTP requests.

Complicated hacks and workarounds all take more time. And time is money in the business world (especially to support a dying user base).



#myelement {     color: #999; /* shows in all browsers */     *color: #999; /* notice the * before the property - shows in IE7 and below */     _color: #999; /* notice the _ before the property - shows in IE6 and below */ }



파이어폭스, 크롬 핵


@-moz-document url-prefix(){
    selector{text-indent: 20px;}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
    selector{text-indent: 20px;}
}









'코드 > Html & CSS' 카테고리의 다른 글

[less]mixin 문자열 연결  (0) 2014.04.07
page-break  (0) 2014.03.28
플래시 z-index  (0) 2013.10.14
textarea 에 사용자폰트 적용  (0) 2013.10.14
textarea 사이즈 고정  (0) 2013.10.11