Webmasters Heaven, Free submission, Free Promotion, Free Tools
Backword Forward Home add this page to favoirates send this page to a friend print this page icons articles Webmaster Tools Web Site Submit
sitemap
Free Icons Free Articels Free Tools Website submission

Articles Category  ]

Google
 
Advertising
Affiliates
Blogs
CGI
CSS
DHTML
Domain Names
ECommerce
Email
HTML
Internet
Javascript
Link Popularity
Marketing
MLM
Newsletters
Promotion
RSS
Search Engines
Site Security
Traffic Analysis
Web Hosting
Web Design
Webmasters


articles -> css
Article Title Author
Tables vs CSS - Which is better? Mike
CSS; Weight loss for your code Sasch Mayer
HasLayout concept explained - Learn how to exploit IE's layout" Lighezan Alexandru
How to make backgrounds for myspace? Brett Hull
Creating Pretty Buttons Scott Alexander
Fluidity and Text Sizing Nicole Hernandez
What is CSS? Devendra Jaiswal
Your New Website is Inside Drew Stauffer
Equal Heights Three Column Layout With CSS Rizky
CSS Design for change Dean Cruddace
How To Style Your Text With CSS  Hilco van der Meer
Cascading Stylesheets Advantages: 5 Reasons To Use CSS Hilco van der Meer
Creating Tableless Sites - Why and Some Basics Nicole Hernandez
CSS Cursors - How To Use Them Nicole Hernandez
How to create a Myspace layout? Anthony Stillmann
CSS Link Specificity Nicole Hernandez
The Concept Behind CSS Jose Valdez
The 30 minute CSS tutorial. Shabda Raaj
CSS or Tables? Shabda Raaj
Using CSS with Tables Stephen Cope
Cross Browser Compatibility Warren Baker
The Power of CSS Cliff Ritter
Cascading Stylesheets: 5 Reasons To Use CSS Hilco van der Meer
CSS Browser Detection - The complete guide Afonso Ferreira Gomes
CSS in Flash the return of crisp and legible fonts David Collado
Font Organizers Review, Part I David D. Deprice
7 Reasons Why Using CSS is a Must Michael Turner
SEO Benefits Of CSS Steve Chittenden
Starting Cascading Style Sheets stephen cope
Teach yourself CSS the easy way Erich Bihlman
CSS Print Media Tutorial Karl Regis
Using CCS to Eliminate Tables Sanjay Johari
CSS - Maximum benefits Zoran Makrevski
CSS: The Basics - ID's and Classes ... Correct Eric McArdle
CSS: The Basics - ID's and Classes Eric McArdle
Introduction To Cascading Style Sheets Mitchell Harper

HasLayout concept explained - Learn how to exploit IE's "layout"   by Lighezan Alexandru


What the hell is layout? Layout is an Internet Explorer proprietary concept that controls both size and position of elements. IE uses "layout" to reduce its processing needs. In modern browsers, like FFox, Safari and Opera each element is responsible for it's own size and position. In IE 6 and below this would cause extreme problems related to performance. That's why IE gives "layout" only to elements that really need it. Anyway, "layout" really affects CSS designs, so it's important to know how to deal with it.

What elements do have layout? Elements that have layout include: bodytable, tr, td, input, select, textarea, button, img, marquee, hr, inframe(don't use this, please :) ), object, applet

How to give layout to an element? Using one of these CSS properties: float: left/right; position: absolute; display: inline-block; width/height;

Problems caused by "layout": Elements with layout incorrectly size themselves: Let's say you have a div with width:10px; Write some text inside it and set it's size to 30px. Also set border: 1px solid black; In this situation the text should flow out of the div, but in IE the div incorrectly expands. This shows that IE uses width like a min-width.

Absolute positioned elements within a relative container: Let's say that you have some absolutely positioned elements inside a relatively positioned ancestor. In IE, instead of being positioned relative to the ancestor, these elements will get positioned relative to the viewport. This bug is caused by IE's internal "hasLayout" feature. Elements with relative position are not considered to have "layout". A simple solution for this bug would be to set a width or height, to force the element to have layout. Anyway, maybe sometimes you will not know the dimensions of the element, so you can use the following hack:

/* Hide from Mac \*/ * html.element { heighT: 1px; } /* End hide from Mac */

About the Author

Lighezan Alexandru is a high quality web development articles writer. Some of its work can be found at chml srucnoc online.


[Advertisement ]