Friday, August 7, 2009

How to make Float center -- By yubis IT Solutions

When I was doing Drupal site for Yubis, I encounter this problem: Menu links or other HTML elements can be made float left / right, but is it possible to make it float center?

Unfortunately, there's no such thing in CSS! What we can do is to play with a little trick. The key is to identitfy this: Left 50% and Right 50%!

Consider a menu link as follows:


<ul>
<li>Main Page < / li>
<li>Second Page < /li>
< / u l>

First, we make ul {position: relative; right:50%}
What you'll see is the whole menu link shifts to the right!
Final stpe is to shift this whole thing 50% to the left. So, make things like:
li {position: relative; left:50%}

It's done. Check again your work and you'll see the whole menu now is placed at the center.

PS. Check another reference here: http://www.wowbox.com.tw/blog/article.asp?id=3008

1 comment:

  1. Protecting the hardware of a hermes handbags is as important as the packaging. Every Hermes Evelyne that is sold in their retail stores has a protective covering over the precious metal hardware. This covering is not made of plastic, nor is hermes scarf sticky, and it is never removed until after the purchase has been completed.
    lida daidaihua slimming capsules offer a natural and effective lida weight loss treatment. These daidaihua capsules are available as organic tablets on the market and help suppress your appetite and control your hunger. With regular doses of lida slimming , you can lose the additional weight gradually. slimming capsule slimming capsules are derived from a cactus like plant which is found deep inside the Kalahari Desert in South Africa. slimming capsules slimming capsules contain a molecule known as P57, which works on the stomach to make a person feel full.
    It's a smart idea to go online to buy Chanel bag , since you'll be able to find some fantastic bargains. During you browsing the website, you will find that it is a good time to buy Chanel Wallet . Now there's no need for you to live close to a replica Chanel handbags boutique or high-end department store that carries these exclusive bags. Your new Chanel handbag is delightfully at your fingertips.
    Wear Tiffany co according to your hairstyle: Long hair with long Tiffany bracelets drop earrings will make you look gentlewomanly; short hair with finished stud silver accessories can set off a woman’s crackerjack; asymmetrical hairstyle with asymmetrical Tiffany accessories can make a women look pleasing to both the eye and the mind.

    ReplyDelete