5
08
2006
The following examples show how to set an object in an absolute position anchored at the center of the screen.
It’s very useful because if the size of the user screen changes the site is shown in the same way each time.
EXAMPLE:
To make this I’ve written these lines:
div #myBox
{
position: absolute;
top: 50%;
left: 50%;
width: 420px;
height: 240px;
margin: -210px 0 0 -120px;
}
This is the code that postions a DIV exactly at the center of the screen.
Leggi l’articolo intero »
Comments : No Comments »
Categories : Uncategorized, css, progetti personali, web design
5
08
2006

An annoying problem with IE is that is impossible to “fix” objects on the screen like in Mozilla, with the standard property “position: fixed” of W3C
I read in the book “The CSS Anthology: 101 Essential Tips, Tricks & Hacks” by Rachel Andrew about a trick for fixing a footer bar in IE.
The position “fixed” makes an object be positioned like absolute but it still remains fixed on the screen when the page is scrolled.
Leggi l’articolo intero »
Comments : No Comments »
Categories : Uncategorized, css, progetti personali, web design
5
08
2006
How to write some CSS code that only Internet Explorer can read.
Unfortunately not every browser is W3C standards compliant, so sometimes we have to write some lines that only a specific browser can read.
Let’s see some filters and tricks to write code only for Internet Explorer.
Leggi l’articolo intero »
Comments : No Comments »
Categories : Uncategorized, css, progetti personali, web design