473,699 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Centering navigation bars

1 New Member
hey I'm creating a website for personal use using css and I'm stuck on this section:

Expand|Select|Wrap|Line Numbers
  1. #navigation ul li {
  2.   display: inline;
  3.     float: left;
  4.       height: 28px;
  5.     margin: 0px 35px 0px 7px;
  6. }
  7.  
  8. #navigation ul li a{
  9.     color: #bbbbbb;
  10.     font-size: 13px;
  11.     height: 28px;
  12.     text-decoration: none;
  13. }
  14.  
  15. #navigation ul li a:hover , #navigation ul li#active a{
  16.     color: #f89421;
I would like to center the text but at the moment it's to the left could someone reply asap to change this? :D thanks.
Feb 12 '12 #1
1 1628
Dave0291
33 New Member
Try using
Expand|Select|Wrap|Line Numbers
  1. text-align: center;
for the elements that you want the text to be centered. I see that you have
Expand|Select|Wrap|Line Numbers
  1. float: left;
by having that your li and ul elements will be floating towards the left. You might want to take that out if you don't want that.
Feb 17 '12 #2

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

Similar topics

7
2584
by: Erik Schulp | last post by:
Hi all, I am trying to get a CSS defined layout to center on the page, have tried doing this with the <center></center> tags but than everything is centered, including text etc etc. What should I put into the stylesheet so that, no matter what resolution the viewer's screen is set to, the layout is always displayed centered ? Erik Schulp
3
1202
by: Dennis Allen | last post by:
Hi. My web site uses simple open/close folder navigation links. I know it's time for a change. Question. Does anyone know of css/dhtml code that duplicates the Microsoft site multi-level navigation bars, as in http://msdn.microsoft.com/vfoxpro?
7
1577
by: Eric | last post by:
Goal: Have a (nearly) equivalent website on a local machine (running MacOSX) to what exists on the web host Problem: I have a file call navigation_bar.txt which is included (via SSI- #include virtual=) in every web page. References in navigation_bar.txt that work on the web host, like
2
3646
by: hedrew3 | last post by:
I created a form with a subform using the Access 2000 Forms Wizard. Both the form and the subform have their individual standard navigation bars with the minimum buttons (First, Prev, etc). My question is can you customize these navigation bars? I would like to add the New Record, Delete, etc. functionalities. I note that the Data Access Pages do have the navigation bar visible in design mode, but the Forms don't, so how do you do it?
7
18191
by: Sharon | last post by:
I’m using the Panel control that contains a PictureBox control (for implementing the http://www.codeproject.com/cs/miscctrl/PictureBox.asp). The Panel is set to AutoScroll = true. I wish to scroll the appearing vertical and horizontal scrolls bars of the Panel to the middle of their scrolling range so the contained PictureBox will be centered inside the Panel. But I could not find a way to get the scrolls bars for doing that.
0
1694
by: Sam | last post by:
I am fairly new to ASP. Net 2.0, background MS Access 2000/2003 and working knowledge of SQL 2000. Scenario: Page1: Blank Page loads with 2 Text Boxes (TxtLast, TxtFirst), a Command Button (CmdSearch) and a Gridview to Display result Data (4 Columns: Select but Text is: Show Details, Unique Record ID, Last Name and First
10
2554
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e. six buttons which when clicked go to a separate web page. But here is where I must be missing something, am I right in thinking that if you wish to have nested navigation structures then each individual page of the web site must have a different...
6
2137
by: utomjording_ | last post by:
I'm sure this has been covered before - but I've been trying all sorts of suggestions I've read with no joy. http://polaroid-diaries.co.uk//whatabout2night/hotproperty/ The navigation bar (shown on the page linked above) which I created in dreamweaver sits on the same line fine, but with the extra gaps inbetween the images with links. Is there any way I can get rid of these.. css file can be veiwed...
5
1478
RMWChaos
by: RMWChaos | last post by:
Apparently, I can't do anything the easy way, which seems to lead me here so very, very often. Here is what I am trying to do this time: 1. Autogenerate two navigation bars, "navLeft" and "navRight" 2. The buttons change on hover, "onmouseover" and "onmouseout" 3. The buttons change depending on the "page" being viewed 4. The page does not actually change (DOM scripting and AJAX) 5. Keep the code as light as possible I could (and have)...
2
1769
tharden3
by: tharden3 | last post by:
I have a question for you guys, I'm designing a website. Before I go any further, I'd like to get my navigation bars on the left side up and running. The site is themed to a bumblebee 'black and yellow' color scheme with nectar and honey and all that jazz. It should actually look pretty sweet when it's all done, no pun intended ;) What I was trying to do was have the colors on the nav bars invert when you hover over them. I tried achieving this...
0
8704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8623
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9054
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8895
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7781
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3071
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.