css center |
![]() ![]() |
css center |
Jul 19 2008, 04:16 AM
Post
#1
|
|
|
Spyware Veteran Posts: 20,728 From: Netherlands OS: XP Pro & Vista Ultimate |
Just wondering about a menu I made: QUOTE body { background-color: #88acbb; background-image: url("gradient55895112.png"); background-repeat: repeat-y; /* text-align: center; */ } #navigatie { font-family: verdana, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; color: #ffffff; border-right: 1px solid #88b6bb; border-left: 1px solid #88b6bb; border-bottom: 1px solid #88b6bb; border-top: 1px solid #88b6bb; padding: 0; margin-bottom: 1em; background-color: #88acbb; } #navigatie ul, #navigatie ul ul{ padding: 0; margin: 0; list-style: none; background-color: #88acbb; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 75%; } #navigatie li{ width: 140px; } #navigatie ul{ position: absolute; width: 100px; left: -1000px; margin: -22px 0 0 95px; font-size: 100%; list-style: none; padding: 0; } * html #navigatie ul{ margin: -23px 0 0 95px; } #navigatie li li{ width: 100px; } #navigatie ul ul{ width: 140px; margin: -22px 0 0 100px; font-size: 100%; } * html #navigatie ul ul{ margin: -23px 0 0 100px; } #navigatie ul li { width: 180px; margin: 0; border-top: 1px solid #88b6bb; } #navigatie ul li a { display: block; padding: 2px 2px 2px 4px; border-left: 10px solid #88b6bb; border-right: 10px solid #cccccc; border-bottom: 1px solid #88b6bb; border-top: 0px solid #88b6bb; background-color: #88acbb; font-family: Verdana; color: #000000; text-decoration: none; width: 100%; } #navigatie li li li{ width: 200px; } #navigatie li:hover ul, #navigatie li.ie_does_hover ul{ left: auto; } #navigatie li:hover ul ul, #navigatie li.ie_does_hover ul ul{ left: -1000px; } #navigatie ul li:hover ul, #navigatie ul li.ie_does_hover ul{ left: auto; } #navigatie a { display: block; text-decoration: none; padding: 2px 4px 3px 4px; margin: 1px; } #navigatie a:link, #navigatie a:visited{ display: block; padding: 2px 2px 2px 4px; border-left: 10px solid #88b6bb; border-right: 10px solid #cccccc; border-bottom: 1px solid #88b6bb; border-top: 0px solid #88b6bb; background-color: #88acbb; font-family: Verdana; color: #000000; text-decoration: none; width: 100%; } #navigatie a:hover, #navigatie a:active{ border-left: 10px solid #88acbb; border-right: 10px solid #88acbb; border-bottom: 1px solid #88b6bb; border-top: 0px solid #88b6bb; background-color: #88b6bb; color: #eee; } If I use the text-align: center; in the body that messes up the menu, so now I used this line <div id="foto" style="position: absolute;left: 290px;top: 130px; text-align: center;"> in the HTML code to get the text centered in the div where I need it. Not very elegant, but it works. Is there a more elegant solution? |
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
1 / 94 | 10th November 2008 - 10:24 AM VectoRiot started - last by Granz00 |
|||||
![]() |
0 / 112 | 22nd November 2008 - 04:19 PM Juan1959 started - last by Juan1959 |
|||||
![]() |
0 / 32 | 27th November 2008 - 07:52 PM L_artra started - last by L_artra |
|||||
![]() |
3 / 29 | Today, 01:40 PM KYWOMAN started - last by KYWOMAN |
|||||
|
Time is now: 2nd December 2008 - 11:45 PM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |