View Single Post
  #3 (permalink)  
Old April 4th, 2013, 04:13 PM
codingforever99 codingforever99 is offline
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Centering an UL element within DIV

first of all you have to move your UL and its related li elements to be btween
<div> and </div> Tags, so they will be related to the div element, then you have several options to centering your UL menu, choose one of them.

1- using css code to DIV will center all text including your menu.
Code:
text-align: center;

2- adding some padding space to DIV will move all div element to start after 70 pixel from the left.
Code:
padding-left:70px;

3- moving the main DIV position to the place to want by add this code
Code:
    position: fixed; 
    top: 100px;
    left: 200px;