All you’ve given us is HTML, so if we view that code, everything is aligned left. Perhaps give us the whole page, with the CSS embedded in the <head> section inside these tags:
In the absence of any CSS, the only likely candidate for the problem is the closing </font> tag after the link text “Latest News”. The opening tag is way back before “Home”.
The best course, for modern HTML, would be to do away with <font> altogether and apply styles with CSS.
So, two lines to edit:
Before
<li><a href="index.html"><font color ="black">Home</a></li>
<li><a href="Latest.html">LATEST NEWS</font></a></li>
Ah, it makes a difference with some CSS! Without it, we just saw a long, vertical list of links.
Hmm, to be honest, you’ve asked a tricky question. I’ve not seen floated list items centered once they’ve wrapped to a new line. Perhaps the CSS Ninjas could work out a solution, but short of that, you’ll either have to live with it as is, or use a centered paragraph of links instead. However, given that there’s a drop list involved, this makes things trickier.
Okay, I know I am going to embarrass myself, but here goes… When I first created my site I used MS Expression for saving my first stylesheet. It was only a trial version. Now I have a need to create another stylesheet, but when I save it I cannot open it. The Expression trial program comes up and asks me to purchase.
I tried to save the info I listed above (horizontal list) as a stylesheet, but it didn’t work, and I could not open it because I did not have Expression. Given that I have accepted the fact that the horizontal list will not be centered, how do I save it as a stylesheet, and to which program? Jeesuz if that didn’t confuse you, nothing will…sorry.
Okay, the code that I posted here gives me the horizontal menu I want… How do I apply it to all my pages? Having trouble coming up with a style sheet. Sorry to be so dense…
To clarify…have been told that my home, next back menu is old hat, and not appropriate anymore. Hence I am trying to get my first page menu at the top of each page.
This is often done by means of a Server-side Include (SSI), which is a snippet of code added to each page to import code from an external file. This enables updating an element in multiple pages by editing a single included file.
Not all web servers allow SSI, so you’d need to check this with your hosting company and/or try a test.
Note that this will not work on your home computer unless you are running suitable web server software on it.
Testing SSI
Add a test page named test.html to the web root of your server, where your index/home page is. Add the following code to the file and save:
<!--#include virtual="/includes/nav.html" -->
In the same directory, create a directory named “includes”. This will hold your SSI files.
Create a new file named “nav.html” and add your menu code to it, no need for head or body elements, and put it in the includes directory.
So you’ll have, alongside any other files in your web root ( / = web root ):
/test.html
/includes/menu.html
If you then visit the URL for the test page in your browser you should see the menu.
http://www.stoutstandards.com/test.html
If you see an error message it may mean that the server either does not allow SSI or needs to be configured to do so.