Categories
Friendly Links
Web DesignSEO articles
Online Marketing Expert
websites melbourne
web design experts
internet marketing
web developer resources
web design links
Main Menu
HomeLogin
Register
Submit Article
Latest Articles
Search
Pages
Links
Sex ToysSex toys online
LELO Vibrator
Site Stats
Total Category: 6Total articles: 29777
Total authors: 14416
27 users online.
How to Create Cross Browser Pixel Perfect Layouts With CSS and a Reset
Author: Guest
Total views: 80
Word Count: 367
It\'s very easy to create CSS based layouts that work cross-browser very effectively, especially across Internet Explorer, Mozilla Firefox, Google Chrome, Apple Safari, and Opera. The trick is to reset your CSS Stylesheet. Read below for details on how to accomplish this in your code.
sex toys | dildos | massager
When people hear the words CSS, they often freak out especially if they come from a Table based background. But please, don't be scared. It's a nice world to be in once you get the hang of it. With the tips below, I hope to give you some baby steps in creating cross-browser friendly CSS tips so your websites look the same in any web browser.
Star-Selector Reset
To start off, we want to begin our CSS document with what is known as the star selector (*). Your code will be this simple:
* {margin: 0px; padding: 0px;}
What that does is tell the web browser to interpret ALL HTML elements (h1, p, UL, LI, etc...) to have NO padding and NO margins. It's literally a global reset.
Now, in your css when you give an element a particular MARGIN or PADDING, every browser that reads it will adhere to those rules. By default, every browser has its own DEFAULT method of handling the margins and paddings, which throw your layouts off from browser to browser.
Using a second set of divs for padding
Another method I use to deal with margin/padding issues across browsers is when there are 2 containers floated side by side, and you give padding to them. Internet Explorer will treat this differently then say Firefox. The key is to embed an extra pair of DIV's inside the main containers, and apply the padding to those internal divs. Case in point: In the code sample below, 200px width will actually become 220px because of the 10px side padding.
Instead, you want the width to stay 200px, and the padding to apply inside. The solution is one extra DIV pair with the 10px padding applied like such:
I posted sample code on the Pastie Code website: pastebin.com/pgi2c4yb
So between the * selector reset and applying your box padding to an internal set of div's, your cross-browser attempts will be much more successful.
Article Source: Web Design Melbourne
About the Author
Rating: Not yet rated
Comments No comments posted.
Add Comment
You do not have permission to comment. If you log in, you may be able to comment.Copy and Paste Article Code.
Remember: The article body, title, author bio and links may not be changed or removed. By publishing this article, you agree to all the terms in our Terms of Service.
More articles in this Category
