473,609 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS Menu Rendering Problem in Opera

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 added below each list
item, that gets bigger for each subsequent item. Can someone please
take a look and see if they can find my problem? It works almost
perfectly in Firefox so you can see how it should look. It degrades
quite a lot in IE, there's only one hack in there to make it at least
readable.

The style sheet is:
http://www.lachy.id.au/lib/style/basic/coolblue
(It does validate, with the exception of -moz-border-radius which I'm
just experimenting with)

Finally, if someone could let me know how good or bad it looks in
Safari, that would be good too. But I'll fix those problems when I buy
my first Mac in a few weeks.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #1
28 3406
I don't have Opera installed (I'm a Firefox man) but your site looks good.
You're not wrong about it degrading horribly in IE :-)

Which town in central NSW are you from? I'm in Tamworth (and I don't like
country music, either ;-)
Jul 20 '05 #2
Frostillicus wrote:
I don't have Opera installed (I'm a Firefox man) but your site looks good.
Thank you.
You're not wrong about it degrading horribly in IE :-)
Yeah, I know. That's why I call it Internet Exploder ☺
Which town in central NSW are you from? I'm in Tamworth (and I don't like
country music, either ;-)


Well, it's off topic, but ok, I'm originally from Parkes, but have since
moved to Sydney for work.

--
Lachlan Hunt ☺
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #3
Els
Lachlan Hunt wrote:
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 added below
each list item, that gets bigger for each subsequent item.
Can someone please take a look and see if they can find my
problem?
Haven't looked at all the possibilities, but if you change:
#sitenav li { margin: 0; padding: 0; text-align: center;min-
height:100%;}
to:
#sitenav li { margin: 0; padding: 0; text-align: center;min-
height:40%;}
the problem seems to disappear (in my 'only the menu'-test).

Could well be that this has to do with one of the other
properties somewhere in the code though.
It works almost perfectly in Firefox so you can
see how it should look. It degrades quite a lot in IE,
there's only one hack in there to make it at least
readable.


In my IE6.0 WinXP, I get a 406 : Not accepted. My own local
copy does work however...
Could enhance it a tiny bit more by centering the page though
:-)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 20 '05 #4
Els wrote:
Lachlan Hunt wrote:

...causing Opera to render my drop down menu incorrectly...

http://www.lachy.id.au/

... seems to be extra margin added below
each list item...

Haven't looked at all the possibilities, but if you change:
#sitenav li { ... min-height:100%;}
to:
#sitenav li { ... min-height:40%;}
the problem seems to disappear (in my 'only the menu'-test).


Thank you, that was essentially the problem. I ended up just taking it
out, and setting the height to 2em instead. The menu now works
perfectly well in Opera, though I can't work out how to get the text for
each menu item to be vertically centered within it's block without
adding supurflous <span>s to the mark up.

The method I was using that works in Firefox:

#sitenav li a { ... padding: .4em 0; line-height: 1.2em; }

which should add to 2em, thus vertically centering within a box that is
2em high, was being miscalculated by Opera due to what looks like a
rounding error, leaving a 1px gap between each menu item.

Oh well, unless someone can suggest another method, I'll just live with
it. I tried display: table; vertical-align: middle; but it caused other
problems.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #5
Els
Lachlan Hunt wrote:
Els wrote:
Lachlan Hunt wrote:

...causing Opera to render my drop down menu
incorrectly...

http://www.lachy.id.au/

... seems to be extra margin added below
each list item...

Haven't looked at all the possibilities, but if you
change: #sitenav li { ... min-height:100%;}
to:
#sitenav li { ... min-height:40%;}
the problem seems to disappear (in my 'only the
menu'-test).


Thank you, that was essentially the problem. I ended up
just taking it out, and setting the height to 2em instead.
The menu now works perfectly well in Opera, though I can't
work out how to get the text for each menu item to be
vertically centered within it's block without adding
supurflous <span>s to the mark up.


Setting the line-height to the same as the height I think.
The method I was using that works in Firefox:

#sitenav li a { ... padding: .4em 0; line-height: 1.2em; }

which should add to 2em, thus vertically centering within a
box that is 2em high,
Ah, you did that already :-)
was being miscalculated by Opera due
to what looks like a rounding error, leaving a 1px gap
between each menu item.


And what if you anticipate that error and put the line-height
to 2.1em? Or take the .4em padding out? If the line-height is
equal to the height, padding should be obsolete, I think?

What I don't get, actually, is what you are seeing in Opera.
I've just taken out the min-height:40% that I had in it, and
afaics the menu items are all vertically centered in their
respective little boxes:

http://locusmeus.com/temp/lachlan.html

(Opera 7.51)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 20 '05 #6
Els wrote:
... If the line-height is
equal to the height, padding should be obsolete, I think?
I didn't realise that was how line-height worked — it's one of those
properties that has always confused me. I made the change, the padding
is gone and line-height is now 2em and it works perfectly.
What I don't get, actually, is what you are seeing in Opera.
I've just taken out the min-height:40% that I had in it, and
afaics the menu items are all vertically centered in their
respective little boxes:

http://locusmeus.com/temp/lachlan.html


I thought I tried that, but it seemed to cause another strange bug
firefox. I guess I must have inadvertently made a syntax error or
something. I don't know what was causing the 1px gap in Opera, I
haven't been able to replicate it since.

Thanks again, it now works exactly the way I intended. I even figured
out how to fix the overlapping borders in Opera. So, except for the
unavoidable rounding error between the edges of the sidebar and menu,
it's all pixel-perfect in both Opera and Firefox... Safari's my next
problem, but that will have to wait until I get around to buying my
first Mac.

One thing I don't understand is what caused IE to change the way it was
rendering the menu? I had to update the IE hack so it didn't cover up
any content, but I guess it's a slight improvement for it anyway. If
you want to see what I mean, remove the width from the * html hack at
the end of the file. However, I think it's just one of those
unexplainable mysteries of the universe like nearly every other bug in IE.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #7
Els
Lachlan Hunt wrote:
One thing I don't understand is what caused IE to change
the way it was rendering the menu? I had to update the IE
hack so it didn't cover up any content, but I guess it's a
slight improvement for it anyway. If you want to see what
I mean, remove the width from the * html hack at the end of
the file. However, I think it's just one of those
unexplainable mysteries of the universe like nearly every
other bug in IE.


What I still don't get, is that I still get a 406 in IE...
Your server and my IE are in war or something? The local copy
"works" in IE. (on Apache 2.0.49.0 under WinXP)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Christina Aquilera - Get Mine, Get Yours
Jul 20 '05 #8
On Sat, 21 Aug 2004, Els wrote:
Lachlan Hunt wrote:
One thing I don't understand is what caused IE to change
the way it was rendering the menu?

(IE moves in wondrous ways...)
What I still don't get, is that I still get a 406 in IE...
Are you talking about http://www.lachy.id.au/ ?
Your server and my IE are in war or something?


That server is saying:

| Vary: negotiate,accep t

which indicates (at least if all is working to plan) that the answer
is to be sought in the Accept: header that you are presenting. (I.e
that any Accept-charset, Accept-language ... which might be presented
are not germane to the issue).

If I provoke a 406 from that server, its response headers include
this:

Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Alternates: {"index.html " 1 {type text/html} {language en-au}},
{"index.xhtm l" 1 {type application/xhtml+xml} {language en-au}}

which kind-of confirms that language isn't the issue, since
the only language variants available are all en-au. (This seems
to be working OK - that server is still returning the en-au variant
even if I tell it that I only accept Afrikaans.[1])

I think we need to know what Accept: header your IE is presenting
(can you find out?).

I know that mine presents this, without any interference on my part
(beyond having installed MS Office, I mean):

HTTP_ACCEPT = application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*

which means that under the provisions of the wildcard (*/*) it is
willing to receive text/html -or- any of the various XHTML
content-types, even though IE has little idea what to do with those
when it gets them (some would say much the same about its reaction to
text/html, but I digress).

But that header can be doctored (I'm told, by those with a willingness
to go tinkering with the registry...). Possibly it also gets adjusted
by one or other "fix" from galactic HQ, I don't know.

cheers

[1] No special reason for choosing Afrikaans, except that it's right
at the top of the menu ;-)
Jul 20 '05 #9
Els
Alan J. Flavell wrote:
On Sat, 21 Aug 2004, Els wrote:
Lachlan Hunt wrote:
> One thing I don't understand is what caused IE to change
> the way it was rendering the menu?
(IE moves in wondrous ways...)
What I still don't get, is that I still get a 406 in IE...
Are you talking about http://www.lachy.id.au/ ?


Yes.
Your server and my IE are in war or something?


That server is saying:

| Vary: negotiate,accep t

which indicates (at least if all is working to plan) that
the answer is to be sought in the Accept: header that you
are presenting. (I.e that any Accept-charset,
Accept-language ... which might be presented are not
germane to the issue).


And how would I change that?
If I provoke a 406 from that server, its response headers
include this:

Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Alternates: {"index.html " 1 {type text/html} {language
en-au}}, {"index.xhtm l" 1 {type application/xhtml+xml}
{language en-au}}

which kind-of confirms that language isn't the issue, since
the only language variants available are all en-au. (This
seems to be working OK - that server is still returning the
en-au variant even if I tell it that I only accept
Afrikaans.[1])

I think we need to know what Accept: header your IE is
presenting (can you find out?).
How?
I know that mine presents this, without any interference on
my part (beyond having installed MS Office, I mean):

HTTP_ACCEPT = application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, */*

which means that under the provisions of the wildcard (*/*)
it is willing to receive text/html -or- any of the various
XHTML content-types, even though IE has little idea what to
do with those when it gets them (some would say much the
same about its reaction to text/html, but I digress).
But this is the very first time I ever had a 406 from anywhere
in the world...
But that header can be doctored (I'm told, by those with a
willingness to go tinkering with the registry...).
Possibly it also gets adjusted by one or other "fix" from
galactic HQ, I don't know.

cheers

[1] No special reason for choosing Afrikaans, except that
it's right at the top of the menu ;-)


Plus I'd understand it ;-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Diana Ross & Supremes - Motown Hits medley
Jul 20 '05 #10

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

Similar topics

12
3379
by: MP Multimedia | last post by:
Hello everyone, I need help. I'm using a hierarchical menu made in javascript. When I used it in a one frame page, it came out fine. But now I need to change my page to 3 frames: a top frame, a left frame and a right frame. The menu is on the top frame and when hovering the categories, the sections appear under the left and right frame. How do I solve that problem? (I use Dreamweaver.) Thanks for all your answers.
1
4312
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i want to make first text as Table Heading/menu category. For examle in the given menu i want to make a heading as "Comp. Languages" which won't be a link. 2) The position of this menu is absolute to the page. I want to make it absolute to the Table...
2
5312
by: Ansgar Hein | last post by:
I have been playing around with several different versions for a horizontal menu, but I haven't been able to build a horizontal navigation based on the vertical one featured on www.alistapart.com in the article "taming lists". However I have managed to build a horizontal navigation but it has a slight hitch in Mozilla and Opera, but it's fine in Internet Explorer. It is a strange occurrance of a 4 - 5 Pixel bar in grey (which is the...
7
2217
by: Lachlan Hunt | last post by:
Hi, In the "Firefox 5 Minute Challenge" that I'm trying to write the stylesheet for, the height of language bar needs controlled by the height of the content, so that if the window is not wide enough, and the menu items wrap around to the next line, the height of the <ul> increases, and thus the background stays behind the list items. The height has been set using min-height for for those that support it and 'height' for IE only. It...
26
2813
by: Thomas Mlynarczyk | last post by:
Hi, Could some kind person using Mac or Linux (or others) please take a look at http://www.mlynarczyk-webdesign.de/tmp/menu/menu.html and tell me if the page renders as it should (screenshot provided on the page)? Never mind the colors, this is just to test the functionality. The page validates (HTML & CSS), and seems to "work" as expected on Windows (IE5+, OP5+, NN5+, Mozilla & Firefox). I know the styles won't work on IE4
2
1850
by: Unknown User | last post by:
I have created a dynamic CSS menu but it doesn't work fine in IE. It works fine in Opera and Firefox. Here it is, please hover over "My account" to see the submenu: http://www.smartads.org How can I center the 2nd-level UL horizontally from the page? Thanks, -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ http://www.auriance.com - http://www.auriance.net
2
5288
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance RWD <script type='text/javascript'>
0
1684
by: Jack Gray | last post by:
I am using a nested list for a simple drop-down menu. All CSS and XHTML validate. The menu is displayed properly in 7 different newer browsers including IE7, Firefox, Opera & Safari. I have implemented csshover.htc. In IE6, the menu displays on two lines and the drop-down (Calendar) does not work. Any clue where the problem lies? Url: caz-cc.com/index.htm. Thanks soooo much!
4
1814
by: AG | last post by:
Using ASP.NET 3.5 I have been using a standard menu control bound to a sitemapdatasource using a web.sitemap file. The menus work fine in IE and Firefox, but in Safari, they render horribly and dynamic menus don't work at all. I found a post indicating that rendering can be improved by modifying browserCaps, but not the dynamic functionality. A search finds many third party menu controls. Most of which utilize their own xml file source.
0
8127
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
8067
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
8567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8527
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...
1
6053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5509
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
4015
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1380
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.