Crossbrowser Compatibility Issues
When aligning elements like this, it is always a good idea to predefine margin and padding for the <body> element. This is to avoid visual differences in different browsers.
There is a problem with IE8 and earlier when using the float property. If the !DOCTYPE declaration is missing, IE8 and earlier versions will add a 17px margin on the right side. This seems to be space reserved for a scrollbar. Always set the !DOCTYPE declaration when using the float property:
Example
body
{
margin:0;
padding:0;
}
.right
{
float:right;
width:300px;
background-color:#b0e0e6;
}
{
margin:0;
padding:0;
}
.right
{
float:right;
width:300px;
background-color:#b0e0e6;
}
Other Topics
CSS
:Pseudo Classes,CSS
:Before pseudo element,CSS
:After pseudo element,CSS
: Multiple pseudo elements,CSS
: pseudo-elements and CSS classes,CSS
: First-letter pseudo-element,CSS
: First-element pseudo-element,CSS
: Syntax for Pseudo elements,CSS
: First-line pseudo-element,CSS
: All Css pseudo classes/elements,CSS
: The lang pseudo classCSS : MEDIA,CSS::STYLING
FORMS, mechanical
Engineering, English books,Photoshop
tutorials,Harry
potter,Best
100 english books,Mechanical-old-question-paper,STYLE
HTML ELEMENTS WITH SPECIFIC ATTRIBUTES,CSS
: HORIZONTAL NAVIGATION BAR,CSS
: FLOATING LIST ITEMS,CSS
: IMAGE GALLERY,CSS
: NAVIGATION BARS,CSS
: VERTICAL NAVIGATION BAR,CSS
: LIST OF CSS PSEUDO CLASSES,CSS
: Multiple pseudo Classes
No comments:
Post a Comment