How to
Some Layouts must be centered in your browser display. You can use several ways – i will present here my “best practice”
We use the CSS Framework from Dirk Jesse ->YAML . The author includes a horizontal alignment with the following code:
[basemod.css]
/* Layout Alignment | Layout-Ausrichtung */
#page_margins { margin: 0 auto; }
So, if you need also a vertical alignment, you can use my solution:
[basemod.css] #page_margins { position: absolute; width: 1000px; height: 500px; left: 50%;top:50%; margin-top: -250px; /* enter half of height: */ margin-left: -500px; /* enter half of width: */ }
With this CSS code you can easily center your YAML Layout in front of your display.
If you search for more options, have a look here (german language).
Any questions?
Greetz, Martin
Related posts:
- How to build a YAML fullscreen layout
- Using YAML and be fully variable
- How to code a jQuery slider menu
- CSS: center background image in Firefox & Co.
- CSS floating problems
- Floating problems with IE 6
- How to … integrate a YAML Menu to TYPO3
- How to use position-absolute and z-index with Internet Explorer 7 and nested containers
Some more solutions … have a look here: http://demo.tutorialzine.com/2010/03/centering-div-vertically-and-horizontally/demo.html