472,808 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Opera problem with auto centered menu

I'm working on a lightweight, auto width, auto centered, one level drop
down menu. It's working in FF, IE7 and Safari (all windows versions on
my local system), however it fails in Opera.

Can someone please take a look at this and give some suggestions.
Thank you


PS The testmenu is stripped down for testing purposes and will not work
in IE6, where Javascipt and an additional line of css are needed.
Feb 24 '08 #1
5 2261
totalstranger wrote:
I'm working on a lightweight, auto width, auto centered, one level drop
down menu. It's working in FF, IE7 and Safari (all windows versions on
my local system), however it fails in Opera.

FYI, it also fails when the window size isn't wide enough to hold it all
on one line. In my case, the last 2 menu items centered on a 2nd line,
covering up the first link in the Editions drop down which makes it

Something for you to ponder:

Feb 24 '08 #2
totalstranger wrote:
I do comprehend why some people don't like dropdowns, however I like
the way they work.
Are you going to be the only visitor to the web site?

Or do you expect others to look for Zydeco schedules and so forth?

Really? ;-)

-Friends don't let friends drive Vista
Feb 25 '08 #3
On 24 fév, 17:30, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article <47c1a4b3$0$8067$607ed...@cv.net>,


Frankly, how sure is he in wanting centred text in the drop
downs? The idea of dropdowns is fiddly enough, why add a ragged
element? Neat and smart to be left aligned.
I fully agree: why the centered links in the drop down?
All drop-down menus in applications are left-aligned, not centered.

Feb 26 '08 #4
GTalbot wrote:
1- I suggest to forget IE6 entirely.
Personally I think IE6 is a pile of dung, but your recommendation is ill
advised. At most of the sites I manage, IE6 still accounts for about 30%
of the traffic. That's something that can't be ignored, regardless of
how I feel about it personally or how many "get rid of IE6" campaigns
are out there.

Feb 26 '08 #5
On 24 fév, 09:48, totalstranger <totalstran...@not.yahoo.netwrote:
Can someone please take a look at this and give some suggestions.http://www.arnb.org/testmenu.html

I checked your stylesheet and I saw a few problems:

/* Set up the first level list items */
#nav li {
position:relative; /* this allows positioning of second level */
display: inline; /* show as a horizontal line */

but that's not the correct CSS rule for the first level items. The
correct rule is:

#nav li {
position:relative; /* this allows positioning of second level */
display: inline; /* show as a horizontal line */

and when correcting such CSS rule, that makes this other CSS hack
background:transparent url(IMAGES/transparent.gif);/*forces IE7 to
work without scripting*/
/* otherwise secondary menu blanks out on a hover*/

... completely useless, pointless: so, you can remove that
background: transparent url(...);
declaration entirely.

Some other points:

#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
text-align: center;
can be better replaced by

padding: 0;
margin: 0;
list-style: none;
text-align: center; /* although we explained centering is not best */

The selector
#nav li ul li a, #nav li ul li a:visited { ... }
can be better replaced by
#nav ul a, #nav ul a:visited { ... }

You may think those changes are cosmetic but they help in fact parse
the CSS code faster and with lesser chances of triggering bugs in

I then checked in Opera 9.26 and my demo works .. although Opera 9.26
is a bit iffy. It works better in Opera 9.50 build 9807 though.

Regards, Gérard
Feb 29 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Lachlan Hunt | last post by:
Hi, I've been trying, but failing to work out what is causing Opera to render my drop down menu incorrectly on my site. http://www.lachy.id.au/ For some reason, there seems to be extra margin...
by: William Tcherust | last post by:
I'm volunteering for this site using CSS, but Safari 1.2.4 and Opera 6.0 are not rendering my stylesheet as intended. Even though I did most of the job, there's still a bug that I just can't work...
by: eternalD3 | last post by:
Hi, I have a problem to get this working on Opera 7.x+. This does not need to work on older Opera browsers There are problems on rendering the sub-level navigation. It aligns right on Firefox...
by: Raffi | last post by:
Hi, We have an application that requires IE. We recently incorporated CSS scroll areas. The scroll fields are supposed to be centered. They are except for IE5 for the Mac. I have tried various...
by: mangm | last post by:
Hello, I'm using a Mac - when I look at the following HTML from Safari (or Firefox), there is no red gap between the centered DIVs Wrapper and Interior. However, Opera and IE do expose this...
by: gil | last post by:
Viewing my site in Moz 1.7.12 and Opera 8.54, the nav menu intrudes into the content area, but it seems to display correctly in IE 6.0. Between browsers, there is a marked difference in the...
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/Demo/photo%20block%20experiments.html I've ended up with what seems like a rather complex structure for what I thought would be a somewhat simple...
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
by: Candoer | last post by:
I am new to both HTML and CSS. Several months ago my High School Alumni association web master died and they asked me to take over the web site. I had never worked with CSS but had some experience...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.