Archive for the ‘CSS Hacks’ Category

IE6 color patches on scroll Fixes

I came across the color patches problem on scroll of IE6.
Cause: If we have no or different background color in the parent div and the Current div has different background color.
Example:
HTML CODE
… … …
<div class=”outter-content”>
<div class=”content-home”>
<div class=”banner”>… … …</div>
</div>
</div>
… … …

CSS CODE
.outter-content {
background: #000;
clear: both;
border:#a5b3bb 1px solid;
border-top:0px;
}

.content-home {
clear: both;
padding:0 1px;
background: #d8eaf0;
border-bottom:1px solid #a6b4bc;
}

.banner{
background: url(“../images/banner.png”) [...]

Posted in CSS Hacks, Tutorials , Tagged with , , On May 4, 2009, 0 Comments.

IE6 Auto-width Margins Problem fixed

Many of developers faced the Auto width Margin (margin:0 auto;) problem in IE6 browsers to make the content div center aligned irrespective of browser window.
Here is the solution.
Modify the CSS accordingly:

body {
margin:50px 0px; padding:0px;
/* Need to set body margin and padding to get
[...]

Posted in CSS Hacks, Tutorials , Tagged with , , On May 1, 2009, 0 Comments.

CSS Browser Selector

Clever technique to help you on CSS hacks.
CSS Browser Selector is a very small javascript with just one line and less than 1kb which empower CSS selectors. It gives you the ability to write specific CSS code for each operating system and each browser.
EXAMPLE

http://rafael.adm.br/css_browser_selector/
Source of this example:
<style type=”text/css”>
.ie .example {
background-color: yellow
}
.ie7 .example {
[...]

Posted in CSS Hacks, JS Hacks , Tagged with , , On December 22, 2008, 0 Comments.