473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I get the text within this div to center?

I am using modx to create a site at www.mmwri.com.
The navigation is dynamically generated by Wayfinder. I am trying to style the text with the navigation div. I can make it look fine in any Mac browser but the spacing overflows the navigation to a second line in Windows Browsers. Any input would be appreciated. Thanks!

Here is the CSS:
Expand|Select|Wrap|Line Numbers
  1. #navigation        {     background-color: white; width: 800px;   display:block;
  2.  
  3.                     height:40px;  padding-bottom:10px;  margin-left: auto; margin-right: auto; }
  4.  
  5. #navigation ul    {    margin: 0; padding: 10px 0 0 0;  list-style:none;  }
  6.  
  7. #navigation    li    {    display:block; float:left; padding: 0 15px; text-align: center;
  8.                     border-right: 2px solid #00266D;  margin-left: auto; margin-right: auto; }
  9.  
  10. #navigation li.last    {    border-right: none; padding-right:0; margin-right:0;    }    
  11.  
  12. #navigation a    {    color:#09003A; font-family: Arial Narrow; 
  13.                     font-size:20px;text-decoration:none; }
  14. #navigation a:hover {text-decoration: underline; color: black; }
Jun 23 '10 #1
2 1297
JKing
1,206 Expert 1GB
I made a few edits to the following lines.
Give it a try.

Expand|Select|Wrap|Line Numbers
  1. #navigation ul    {    margin: 0; padding: 10px 0 0 0;  list-style:none; text-align:center; }
  2.  
  3. #navigation    li    {    display:inline; padding: 0 15px; text-align: center;
  4.                     border-right: 2px solid #00266D;  margin-left: auto; margin-right: auto; }
  5.  
Jun 23 '10 #2
Awesome, seems to work well. Thanks so much.
Jun 23 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

30
by: BenOne© | last post by:
Hi, I am trying to create a simple two column layout, with a heading centred in the right column. I don't want to specify the size of the right column, but I am limiting the left column to 200...
3
by: Charles Crume | last post by:
Hello; I'm fairly new to CSS, but have learned that Mozilla is supposed to be the most compliant in rendering. I have a web page that uses a style sheet with a class named "page_links" that...
8
by: Tristan Miller | last post by:
Greetings. Is there any way of using CSS alone to make an object centered and with a dotted or dashed line extending on either side to the borders of the enclosing object? For example, I have...
18
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I...
2
by: ismailc | last post by:
Hi, I need help please! I want to vertical align the text within a text box. I can set the vertical align of the text box but not the text. My text box has a style property of: style...
13
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. ...
0
by: none | last post by:
Sorry my bad I was setting the text property to an empty string... thanks for the help - CES "none" <none@none.comwrote in message news:eaJIxCA7IHA.2260@TK2MSFTNGP03.phx.gbl...
3
by: smokinlabbit | last post by:
I'm trying to come up with a solution (but with no real direction to start with) where I'm trying to edit data in a td element of a table on the spot. What I want to do is when a td element...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.