Is it possible to centering objects or links horizontally using <ul><li> i tried but it gets aligned to the left. Using padding-left works but when add link again, i need to re adjust the padding-left value. Hope theres some way to do that. Thanks
centering links in ul li
You could try:
Last edited by The World is Yours on Tue Aug 21, 2007 6:59 am; edited 1 time in total
| Code: |
|
text-align: center; display: inline; |
Last edited by The World is Yours on Tue Aug 21, 2007 6:59 am; edited 1 time in total
...or you could try
It would probably be easier.
| Code: |
| <center>your text</center> |
It would probably be easier.
| W3schools wrote: |
| The center element was deprecated in HTML 4.01.
The center element is not supported in XHTML 1.0 Strict DTD. |
Hi hassan,
I'd recommend against using display:inline as below as that could give unexpected results!
Instead how about...
Hope this helps,
Cheers,
fuzzy
I'd recommend against using display:inline as below as that could give unexpected results!
| The World is Yours wrote: | ||
You could try:
|
Instead how about...
| Code: |
| ul {
margin: 0 auto; padding-left: whatever-you-want; } li { margin: 0; width: 100%; text-align: center; } |
Hope this helps,
Cheers,
fuzzy
Thanks this Helps..
