суббота, 9 февраля 2013 г.

цсс по центру

All content not created by Admiral is Copyright it's own respective owners.

All content created by Admiral is licensed under a .

This site and its contents were created by .

Remember kids, the sooner we can get all of our families and friends using one of "The GOOD browsers", the sooner IE will loose its market share, and the sooner we can to stop catering to Microsoft's inadequacies.

. Screenshots were provided by .

Please keep in mind that this trick only works

You can of this sweet trick in action on a quick little page I wrote up to test this, and for the trick and play with it yourself.

<img src="some_image.png" class="center">

Anyway, here's a basically what's happening above:

If you use Safari and don't have the "Inspect Element" contextual menu option available when you right click inside a page, you probably need to go to the "Advanced" tab in your Safari preferences and click the "Show Develop menu in menu bar" checkbox. FireFox users can get a similar functionality by installing , which is, for the record, totally the sweetest Javascript debugger around. That I have used. To date.

Tonight, I stumbled across a really nifty little trick that Safari uses to center lone multimedia elements on pages. Safari does this when you visit links to MP3s or other Quicktime readable multimedia across the web, and the destination ends up being a browser window rather than a forced download. I discovered this when I right clicked on the background of one such page and selected the "Inspect Element" contextual menu item.

For the longest time, I've been trying to figure out just how exactly to center elements on a page using only CSS properties, and without having to use an HTML 4.01 transitional DTD and telling a table to be 100% wide and 100% tall, aligning it's contents to center, then valigning them to middle. I think I've finally found a way to do it.

Posted in category: on: 2010-02-04 18:32:55

I had been trying to figure out how to center elements vertically on a page using only CSS properties. Safari 3 finally offered a solution.

A wobsite about Graphic Design, Web Development, creating Toys,and anything else I feel the need to yell at the intercats. (I will end you!!)

Cool HTML5 CSS Absolute Center Trick | Nuclear Pixel

Комментариев нет:

Отправить комментарий