Problem centering UL and LI elements - Page 3

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: Problem centering UL and LI elements

Captain Paralytic wrote:

Quoted text here. Click to load it

I'd guess Newbie meant to say JavaScript.   Java != JavaScript

ECMAScript must have been too hard to pronounce. How many wish they'd
picked a different name other than JavaScript?
Raise your hands!

   -but now he knows the difference!

Re: Problem centering UL and LI elements

Newbie writes:

Quoted text here. Click to load it

I can describe the code, but I don't know FrontPage, so convincing FP
to write that code is up to you.

What I would do is wrap the menu lists in a div, like this:

<div class="menu">
     <!-- menu uls here -->

Now, you can assign a style to the .menu class to center that div:

.menu {
      width: 60em;
      min-width: 60em;

You're probably wondering why I don't just center the uls, and the
answer is that, IMHO, ragged margins look amateurish. A "wrapper div"
such as this one allows the div itself to be centered on the page,
while everything inside of it remains evenly lined up along the left.

That is, instead of this:

                                **** ****
                             **** **** ****

You get this:

                             **** ****
                             **** **** ****

The div as a whole is centered, not its contents.

You can see a modified copy of your page at:



Sherm Pendley
Cocoa Developer

Re: Problem centering UL and LI elements

Quoted text here. Click to load it

Which has two drawbacks, one an unneccessary div, and two, an
unnecessarily unfluid design where wrapping is badly restricted.
In something like a horizontal menu, there is rarely any
justification, when you think about it, for causing horizontal
scollbars. 60em is not a width (much less a min width) some users
would want to be having for their browser to avoid scrollbars.

Quoted text here. Click to load it

This is based on a misunderstanding of the case in hand, the list
items being floated by the OP and you following him. While it may
look amaturish to some people (who might be confusing the more
serious amateurism of having body text and some headings "ragged"
when wrapped), it does not, in any case, necessarily result in
ragged edges and especially when the list items are floated.  
Centring the UL itself does not necessarily result in the list
items being centred within the UL.

The two techniques of centring the UL (or, if you must, a further
block wrapper) by width and auto: margin; on the one hand and
centring by putting text-align: center; on the wrapper to the
list items (either a div, if you must, or the UL itself). The
latter, if the list items are not floated, will result in
"ragged" centring of the wraps.


Re: Problem centering UL and LI elements

Quoted text here. Click to load it

I am not using Frontpage. All code is being written in notepad.
Frontpage was left in the header cos I copied an old page from the
days when I was using it. Sorry for confusion
Quoted text here. Click to load it

Thank you for your efforts and time. There seems to be a lot of
opinions about this. Please see my reply to another post by dorayme on
this topic.

Re: Problem centering UL and LI elements

"Newbie" wrote in message =

Quoted text here. Click to load it

Hopefully the advice given works for you. I am somewhat new to advanced =
so I'd have to do the same as you by asking questions or Googling and =
things. I know a little about a wide range of things, and although I've =
HTML since 1996, I'm in no way an expert.

However, looking at your code I notice that you are involved in =
protective equipment testing, and that is something I am very familiar =
I worked for 15 years at EIL Instruments as their design engineer, and=20
received a patent for a recloser test set. I also did consulting work =
Multi-Amp, later AVO and Biddle/Megger, as well as Phenix Technologies,=20
where I worked with an engineer who is now back with Hipotronics. For =
last 20 years or so I have been involved with ETI,, where =
have designed various circuit breaker test sets and helped repair and=20
retrofit other companies' products. I have also designed and built two=20
versions of a device called an Ortmaster, which is an accessory that=20
facilitates recloser testing.

You may learn more from my websites below, and also see the rather crude =

HTML that I have used for my web pages. I've done some fancier work, =
such as=20 , and that site is soon to be=20
replaced with another that is under construction. Mostly I've been =
Perl and PHP and SQLite lately.

Let me know if I can help with anything you are doing, other than HTML.

Good luck,


Re: Problem centering UL and LI elements


Quoted text here. Click to load it

Hi Paul,
Thats interesting and very coincidental. My background is purely in
electrical protection. I worked for 12 years at CEE relays limited who
specialise in protective relays mainly for generator, transormer and
busbar protection. At the time they were the british distribuutor for
ISA test equipment. In the eary 90's whenutomatic test equipment was
born I was instrumental in writing computerised test programs ot test
specific relay types. In 1999 I set up my own business specialising in
testing protective relays using both manual and automatic test
equipment. I set up a website in 2004 that was very basic and static
and nows the time for change as my business is branching out. I am
quite au fait with PHP and MYSQL but sometimes the simplest of
problems in HTML and CSS seem to baffle me. Perhaps we could exchange
ideas and thanks for your offer.
Kind regards
Paul (Also)

Re: Problem centering UL and LI elements

"Newbie" wrote in message =

Quoted text here. Click to load it

Sure. My email works, so you can reply to this post or just get the =
from one of my websites. Anything(at) works for them. It would =
interesting to exchange ideas with a fellow engineer in the same area of =



Site Timeline