Welcome To Snipplr
Everyone's Recent Snippets Tagged center
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A way to do 100% DIVs that adjust to content and center themselves both vertically and horizontally automatically. Tested for all browsers at 1920X1080 resolution. The 96% body height fixes Firefox and IE scrollbars that appear without reason and mig...
1
837
posted 14 years ago by bryanlyman
This enables you to center a horizontal unordered list that uses "float:left". Normally, this is almost impossible with pure CSS, but Javascript makes it easy. jQuery makes it even easier.
0
701
posted 15 years ago by corey
Applications:
1. Centered block with unknown width
2. Simple block which can have float style (f.e. horizontal menu)
1
734
posted 16 years ago by kossmoss
I can't remember if this code is updated for IE7, if it is then it should be working in at least IE6-7, Safari 2-3, Opera 8 and Firefox 2-3.
Obviously the image_iefix is just for IE6.
2
751
posted 16 years ago by teddyzetterlund
********************************************************************************
* *
* Andreas writes groovy scripts! Jana corrects the mistakes! ;-) *
*...
0
897
posted 17 years ago by asteinhaus
Wenn man eine Seite horizontal zentrieren möchte, ist das eigentlich recht einfach. Per CSS kann man mit margin:0px auto; einen div layer perfekt und schnell zentrieren. Bei älteren Browserversionen wie IE5.5 oder IE5.0 funktioniert das aber leider...
1
945
posted 17 years ago by smilylion