Editing a website template... help please!

Soldato
Joined
12 Mar 2003
Posts
8,342
Location
USA
Hey guys,

I'm editing a basic template for my dad's company - but I'm a total HTML noob so I only have a very basic idea of what's going on! I'm using Notepad++ to edit, and the template I'm using is here. Was wondering if I can pick your brains with all the problems I am coming across please!

The first one; I want to centre the main menu bar (Home, About, Services etc.), but using <DIV ALIGN=CENTER> is not working. Here is the code at present:

Code:
<!--Begin main navigation menu-->

<div id="menu">

<ul>

<li><a title="Return to Home Page" href="#">Home</a></li>
<li><a title="Learn More About Us" href="#">About Us</a></li>
<li><a title="Company News" href="#">News</a></li>
<li><a title="Services We Offer" href="#">Services</a></li>
<li><a title="Contact Information" href="#">Contact Us</a></li>
<li><a title="Our Affiliates" href="#">Resources</a></li>

</ul>

</div><!--End main navigation menu-->

How do I centre this?!

Cheers,

Suman
 
Well, it's definitely free for a reason.

Anyway, they have the ul absolutely positioned so just adjust the 'left' property in your css sheet (style.css - line 118 or so).
 
lol, I thought it was pretty nice for a free template! Or do you just mean the coding is pretty shoddy?

Do you mean change the "left: 2px;" to "center: 2px;". Because that doesn't work either :(

2nd problem - I want the logo to start at a higher position. If I adjust teh default Height it just makes the logo go lower (cutting across the divdiing line).

Cheers,

Suman
 
No, you want to change the value for left.
left: 150px;

You'll need to play with the number in order to get it right. There are better ways to do this but I'm not going to try and walk you through it.

For the logo, it's also absolutely positioned, so just edit the top: property on #logo. Any number less than the current value will move it upwards. When it says top: 66px, that means 66px from the top.
 
Hey Trip,

A full site is up now at www.ehsm.co.uk. Could you have a quick look over it for me please? A lot of the content is just placeholder text, but hopefully the main "bits" are all roughly working! Also, what's the best way to fix the bottom bar in one position (to stop it "bouncing" around when you navigate through the pages)?

Thanks very much for all your help so far :)

Cheers,

Suman

P.S. Gave up on the centred nav menu - looks ok centred?
 
Last edited:
Nav looks fine just where it is. If you really wanted to center it without changing the way it's been put in already, go into your stylesheet and find #menu ul. It has left: 2px specified, just keep changing that higher until it's centered.

For your footer, you'll want to google sticky footer, or set a min-height (with workaround for IE6) on your #container. Personally, I'd just leave it as it is.
 
Few things to change.

div id="menu"

remove "position: relative"

menu.ul

remove "posibition: absolute" and "left: 2px"

if you want to really center the menu then add a fixed width to the div id="menu" and center using margins

width: 580px;
margin: 0 auto;
 
Last edited:
Back
Top Bottom