473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Why doesn't this work in Opera?

Hi

I'm wondering why my horizontal navigation lists don't align at the
left in Opera as they do in IE6, IE7, Safari, Firefox and iCab?

A URL with both of the horizontal lists is here:

<http://www.patrickjames.me.uk/bicycle/mymoultons.html>

The link for "Hello" should align with the link for "My Moultons" and
both of these should align with the text in the main part of the
web-page.

The CSS is here:

<http://www.patrickjames.me.uk/mylifestyles.css>

The font size for the body is 100% but in the navigational lists it is
reduced to 80% and 70%.

The max-width for the main part of the text is 42em and the max-width
for the first navigational list is with 80% text size is 52.5em, the
max-width for the second navigational list with 70% text size is 60em.

This produces perfect alignment on the left with every browser I've
tried except Opera.

As an aside IE6 has a conditional comment specifically for it which has
fixed width declarations in a separate style-sheet.

--
Patrick
Brighton, UK

<http://www.patrickjames.me.uk>

Nov 25 '06 #1
10 2307
patrick j <pa*****@jamesnews.orangehome.co.ukwrote:
news: 00*****************************@News.Individual.Ne t
Hi

I'm wondering why my horizontal navigation lists don't align at the
left in Opera as they do in IE6, IE7, Safari, Firefox and iCab?

minium font size
[snip]
The font size for the body is 100% but in the navigational lists it is
reduced to 80% and 70%.
>
The max-width for the main part of the text is 42em and the max-width
for the first navigational list is with 80% text size is 52.5em, the
max-width for the second navigational list with 70% text size is 60em.

My Webpage Normal text = 14px
My minimum font size = 14px
nav001 suggest font size 11.2px, my font size 14px
nav002 suggest font size 9.8px, my font size 14px

nav001 max-width = 52.5em, wider then 42em
nav002 max-width = 60em, wider then 42em
This produces perfect alignment on the left with every browser I've
tried except Opera.
This sample has the same issues in my FF as my Opera for the same
reason.

Suggested fix:
leave the font-size on the UL at 100%, set the max-width to match
your mainstuff max-width. If you wish to suggest a font-size of
80%/70%, set it on the UL LI, then make what ever adjustment you may
need to the rest of the css.

--
BootNic Saturday, November 25, 2006 11:03 PM

It is well known that "problem avoidance" is an important part of
problem solving. Instead of solving the problem you go upstream and
alter the system so that the problem does not occur in the first
place.
*Edward de Bono*
Nov 26 '06 #2
BootNic wrote:
My Webpage Normal text = 14px
My minimum font size = 14px
nav001 suggest font size 11.2px, my font size 14px
nav002 suggest font size 9.8px, my font size 14px

nav001 max-width = 52.5em, wider then 42em
nav002 max-width = 60em, wider then 42em
Well firstly, thank you for your help. I didn't realise I had a problem
when people's browsers are set with a minimum font-size. I've now
checked this out of course with FireFox and I see that if a minimum
font-size is set then all goes wrong as you've described :)

You've pointed out a problem I didn't know I had. However I don't think
this is necessarily the problem with Opera, though it might be.
This sample has the same issues in my FF as my Opera for the same
reason.
The strange thing is that while it was going wrong in Firefox set with
the minimum size exactly as one would expect it wasn't going wrong in
Opera in the same logical way.

Before changing it I took this screen grab of the area viewed in Opera:
<http://www.patrickjames.me.uk/operaview.png>

The first navigational list with the link "Hello" as first item is
indented as one would expect with a minimum font-size set, the font in
that is 80% and so extra ems were added to align it with the body of
the text, so if it is then viewed with a browser with a minimum
font-size then it will be indented.

However the next navigation list with first item "My Moultons" has the
font set to 70% and so I'd expect it to be indented yet further, but it
isn't, it is indented, but not as much.

The other point in my "case against" Opera with a minimum font-size
being the problem is that the fonts as you see in the pic are scaled as
described in my own style-sheet, so it suggests that Opera is not
defining a minimum font-size.

I'm afraid I'm very ignorant about the Opera browser and I've been
looking at the pref's for a minimum font-size setting but I can't find
it. It could be there and very obvious but for the present I can't see
it.
Suggested fix:
leave the font-size on the UL at 100%, set the max-width to match
your mainstuff max-width. If you wish to suggest a font-size of
80%/70%, set it on the UL LI, then make what ever adjustment you may
need to the rest of the css.
I tried this, but the horizontal lines on the web-page created by the
UL would become too fat. Oddly enough this would happen in a variable
way with different browsers.

For the time being I've set the max-width for the different block
elements discussed using px which I know is less ideal than em but it
does sort out this particular problem. I'm going to look into this more
thoroughly when I get chance.

--
Patrick
Brighton, UK

<http://www.patrickjames.me.uk>

Nov 26 '06 #3
In article <00*****************************@News.Individual.N et>,
pa*****@jamesnews.orangehome.co.uk says...

Tools Preferences Advanced Fonts | Minimum Font Size
--
Please visit -
Water saving tips: http://graspages.cjb.cc/bigdry/
Nov 26 '06 #4
On Sun, 26 Nov 2006 18:12:10 +0000, patrick j
<pa*****@jamesnews.orangehome.co.ukwrote:
>Well firstly, thank you for your help. I didn't realise I had a problem
when people's browsers are set with a minimum font-size. I've now
checked this out of course with FireFox and I see that if a minimum
font-size is set then all goes wrong as you've described :)
>You've pointed out a problem I didn't know I had.
This should be read *first* by anyone who wants to do web design, in my
opinion:

http://pages.prodigy.net/chris_beall/TC/You%20don't%20know.html

.... and the rest of that site too. The Web is not paper.

Nov 27 '06 #5
Ed Seedhouse wrote:
On Sun, 26 Nov 2006 18:12:10 +0000, patrick j
<pa*****@jamesnews.orangehome.co.ukwrote:
>Well firstly, thank you for your help. I didn't realise I had a problem
when people's browsers are set with a minimum font-size. I've now
checked this out of course with FireFox and I see that if a minimum
font-size is set then all goes wrong as you've described :)
>You've pointed out a problem I didn't know I had.

This should be read *first* by anyone who wants to do web design, in my
opinion:

http://pages.prodigy.net/chris_beall/TC/You%20don't%20know.html

... and the rest of that site too. The Web is not paper.
Nice link; thanks.

There will always be arguments about Web design. Especially regarding
javascript, Flash, and other modern technologies. But the basics are
the basics: it's NOT print media. A Web page designer cannot control
the presentation at the end-user level: Not in any meaningful way,
ever. Trust me, if you can design it, I can break it at the local level.

This IS a different medium, it is NOT print. Make it fluid, let it flow
for each user. Yes, there will always be some users who are so beyond
the edge that your design breaks. Most won't if you understand the medium.

The only way you can ensure that the user sees what you intend is to
make your page one big picture file. And that won't work either since
every browser will give some control to the user over images. So, stop
thinking print and start thinking fluid design. Google it if you don't
know what that means. The Web is text based, even more basically,
text/code based. And I (we) can control how our browser/eyes render
your craftiest design. Which won't be how you thought it out. Unless
you know the medium for which you are designing.

If you're contemplating these issues see these newsgroups:

alt.html
comp.infosystems.www.authoring.stylesheets

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
All I ask is that you treat me no differently than you would the King.
Nov 27 '06 #6
Ed Mullen wrote:
A Web page designer cannot control
the presentation at the end-user level: Not in any meaningful way,
It would be great if people would look at my original question and
consider what I actually asked instead of endlessly repeating this
lecture about fluid design.

I know all about fluid design. The problem I was writing about wasn't a
result of trying to create a fixed design of some sort.

--
Patrick
Brighton, UK

<http://www.patrickjames.me.uk>

Nov 27 '06 #7
All lines up left perfectly in Opera for me... (v.9.02 or 9.10 b8660)

--
Chris Hughes
"Reality is that which, when you cease to believe, continues to exist."
http://www.epicure.demon.co.uk
Nov 27 '06 #8
The Major wrote:
All lines up left perfectly in Opera for me... (v.9.02 or 9.10 b8660)
What does? (hint: quote what you are replying to, as you have no way of
knowing whether the earlier messages are available on any given
server).

If you mean the OP's page at
http://www.patrickjames.me.uk/bicycle/mymoultons.html, then it now
lines up because the OP has replaced the em widths with pixel widths.

Steve

Nov 27 '06 #9
patrick j wrote:
I'm wondering why my horizontal navigation lists don't align at the
left in Opera as they do in IE6, IE7, Safari, Firefox and iCab?

A URL with both of the horizontal lists is here:

<http://www.patrickjames.me.uk/bicycle/mymoultons.html>

The link for "Hello" should align with the link for "My Moultons" and
both of these should align with the text in the main part of the
web-page.
The font size for the body is 100% but in the navigational lists it is
reduced to 80% and 70%.

The max-width for the main part of the text is 42em and the max-width
for the first navigational list is with 80% text size is 52.5em, the
max-width for the second navigational list with 70% text size is 60em.
Opera is rounding the font size to the nearest pixel before calculating
the em widths.

Assuming a 16px browser default font size

16 * 0.8 = 12.8 which Opera rounds down to 12px.
16 * 0.7 = 11.2 which Opera rounds down to 11px.

12 * 52.5 = 630px
11 * 60 = 660px

Always rounding down is a long standing bug in Opera.
Using rounded values for the computed font size when calculating other
lengths defined in ems is another bug.

See http://steve.pugh.net/articles/opera...-rounding.html
for a demo and discussion.

I would suggest that the bets fix is to let both UL elements have the
same font size and set the same width in ems. Then apply font sizing to
the LI or A elements instead.

Steve

Nov 27 '06 #10
patrick j wrote:
I'm afraid I'm very ignorant about the Opera browser and I've been
looking at the pref's for a minimum font-size setting but I can't find
it. It could be there and very obvious but for the present I can't see
it.
Preferences Advanced Fonts Minimum font size

(Opera 9, Linux)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Nov 28 '06 #11

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

Similar topics

2
by: Mika | last post by:
Hi, I'm trying to use the following code which should open a popup window. It doesn't work with Opera 5. Netscape 4.x opens a window in wrong size. IE 5.5, Netscape 7.0 and Opera 7.11 are ok. ...
44
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with...
39
by: Mark Johnson | last post by:
It doesn't seem possible. But would the following also seem a violation of the general notions behind css? You have a DIV, say asociated with class, 'topdiv'. Inside of that you have an anchor...
3
by: Gernot Frisch | last post by:
Hi, my menu on www.GLBasic.com doesn't work on Opera 7.23. Can anyone help me please? -- -Gernot Post here, don't email. If you feel you have to mail, revert my
6
by: rob | last post by:
Hi I'm trying to create a "roll-up" effect when a window loses focus and then "roll-down" when it regains focus. This statement works properly with every browser I can get my hands on EXCEPT...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
2
by: petermichaux | last post by:
Hi, I don't know if there is a way to feature detect for this or not. I have a list and the user can click on items to select. I would like that they can command-click on Mac or control-click on...
1
by: spolsky | last post by:
hi, i have the following pages. when form submitted with the field1 value is "ok" then the iframe must be loaded with the text "Page loaded...". This works fine with IE 6 and FireFox(1.5) but...
0
by: daonho | last post by:
I've been trying to figure out this problem for so long but no luck. The problem is that I have a ASP.NET Drop Down Listbox with a few item in there, and whenever I select an item from the listbox, I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...

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.