Tag Archives: CSS

Force browser to print background images

I was working on a page with coupons and the coupon had check boxes that the user could check and then print the page to take to the store. I had some trouble styling the checkboxes as the art director … Continue reading

Posted in CSS3, HTML/CSS, JavsScript, jQuery | Tagged , , , | Comments Off on Force browser to print background images

Link not working when behind a stacked DIV?

You have a div stacked on another div, and the div below has links that aren’t clickable because of the div on top. Even if the div on top has a transparent background. Try this: pointer-events: none;Important note: if the … Continue reading

Posted in HTML/CSS, Web Dev | Tagged , , , , | Comments Off on Link not working when behind a stacked DIV?

CSS Even and Odd Rules

STATUS Warning: at the time of writing (February 2003), the major browsers don’t yet support the ‘nth-child’ selector (introduced in November 2001) and only very few support the COL element. EVEN AND ODD RULES One way to improve the readability … Continue reading

Posted in HTML/CSS | Tagged , , | Comments Off on CSS Even and Odd Rules

CSS background cover and contain

This will fill the background with the image. Some parts of the image may be hidden -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-repeat: no-repeat;background-position: top center;background-attachment: fixed;background-image: url(../images/fish.jpg); This will show all of the background image. Unless the images is the same dimensions … Continue reading

Posted in CSS3, HTML/CSS | Tagged , | Comments Off on CSS background cover and contain

Rounded Corners (css)

-webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px;

Posted in CSS3, HTML/CSS | Tagged , , , | Comments Off on Rounded Corners (css)

Ultimate CSS Gradient Generator

Cool CSS3 gradient generator: http://www.colorzilla.com/gradient-editor/

Posted in CSS3 | Tagged , , | Leave a comment

IE Ignores margin-top

This issue has caused many a hair-pulling session. For some reason, IE will ignore the top margin of a DIV. There are a lot of details I’m leaving out, but the issue seems to be fixed by moving any “absolutely” … Continue reading

Posted in HTML/CSS | Tagged , | Leave a comment

Change CSS with JavaScript

This is a simple script that will change the CSS of any object. You send the function the ID, the CSS attribute you want to change, and the value.. I actually struggled a bit with this as using dot syntax … Continue reading

Posted in JavsScript | Tagged , | Leave a comment

focus() in Firefox

You have to set a little delay in the focusing of the field. setTimeout(function(){field.focus()}, 10); I found this from at http://www.codingforums.com from a user post.

Posted in JavsScript | Tagged , , | Leave a comment

Opacity not working in IE7

I have had good results using the following CSS for setting the opacity  in most modern browsers. filter: alpha(opacity=70); /* Internet Explorer */ -moz-opacity:0.7;    /* Mozilla 1.6 and below */ opacity: 0.7;    /* newer Mozilla and CSS-3 */ … Continue reading

Posted in HTML/CSS | Tagged , , , | Leave a comment

“min-height” does not work in IE6. Here is a hack to kick IE6 in the ass.

min-height:500px; height:auto !important; height:500px;

Posted in HTML/CSS | Tagged , , | Leave a comment