How to get Cross Browser Compatibility Every Time

Filed Under (General) by Wenbert on 19-06-2008

Tagged Under :

Yet another CSS post. The second one for today.

Cross-browser compatibility is one of the most time consuming tasks for any web designer. We’ve seen many different articles over the net describing common problems and fixes. I’ve collated all the information I could find to create some coding conventions for ensuring that your site will work first time in every browser. There are some things you should consider for Safari and Firefox also, and IE isn’t always the culprit for your CSS woes.

Perfect CSS Layouts. No CSS hacks. SEO friendly. No Images. No JavaScript. Cross-browser & iPhone compatible.

Filed Under (General) by Wenbert on 19-06-2008

Tagged Under :

I had to post this.

No CSS hacks

The CSS used for this layout is 100% valid and hack free. To overcome Internet Explorer’s broken box model, no horizontal padding or margins are used. Instead, this design uses percentage widths and clever relative positioning.

SEO friendly 2-1-3 column ordering

The higher up content is in your page code, the more important it is considered by search engine algorithms. To make your website as optimised as possible your main page content must come before the side columns. This layout does exactly that: The center page comes first, then the left column and finally the right column (see the nested div structure diagram for more info). The columns can also be configured to any other order if required.
Full length column background colours

In this layout the background colours of each column will always stretch to the length of the longest column. This feature was traditionally only available with table based layouts but now with a little CSS trickery we can do exactly the same with divs. Say goodbye to annoying short columns!

No Images

This layout requires no images. Many CSS website designs need images to colour in the column backgrounds but that is not necessary with this design. Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and XHTML?

No JavaScript

JavaScript is not required. Some website layouts rely on JavaScript hacks to resize divs and force elements into place but you won’t see any of that nonsense here.

Resizable text compatible

This layout is fully compatible with resizable text. Resizable text is important for web accessibility. People who are vision impaired can make the text larger so it’s easier for them to read. It is becoming increasingly more important to make your website resizable text compatible because people are expecting higher levels of web accessibility. Apple have made resizing the text on a website simple with the pinch gesture on their multi-touch trackpad. So far this trackpad is only available on the MacBook Air but it will soon be rolled out to all of their systems. Is your website text-resizing compatible?

Here is the source.

The 6 Most Important CSS You Need To Know

Filed Under (General) by Wenbert on 31-03-2008

Tagged Under :

Everyone should read this.

CSS to Remove New-lines or Breaks After Form Tags

Filed Under (General) by Wenbert on 03-03-2008

Tagged Under : ,

Put this inside your form tags:

style="margin: 0pt; display: inline;"
//so it would be something like:
< form style="margin: 0pt; display: inline;"> Input boxes here…< / form >

CSS: Float-clearing, getting containers to honor the height of floated elements inside of them

Filed Under (General) by Wenbert on 15-10-2007

Tagged Under :

I accidentally stumbled on this article found at Agile AJAX. It talks about float-clearing, getting containers to honor the height of floated elements inside of them.

Here is a sample CSS code:

    /* float clearing for IE6 */
    * html #container,
    * html .classThatNeedsToBeCleared,
    * html div.anotherClassThatNeedsToBeCleared,
    * html #someDiv .someClass .yetAnotherClassThatNeedsToBeCleared{
      height: 1%;
      overflow: visible;
    }

    /* float clearing for IE7 */
    *+html #container,
    *+html .classThatNeedsToBeCleared,
    *+html div.anotherClassThatNeedsToBeCleared,
    *+html #someDiv .someClass .yetAnotherClassThatNeedsToBeCleared{
      min-height: 1%;
    }

    /* float clearing for everyone else */
    #container:after,
    .classThatNeedsToBeCleared:after,
    div.anotherClassThatNeedsToBeCleared:after,
    #someDiv .someClass .yetAnotherClassThatNeedsToBeCleared:after{
      clear: both;
      content: ".";
      display: block;
      height: 0;
      visibility: hidden;
    }

<div id="container">
    < div id="rail" style="float: left;">
    < div id="content" style="float: left;">
</div>

Click here for the entire post.

Subscribe to Rss Feed : Rss