Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opera Woes 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Can someone tell me why Opera is squashing the menu buttons on this site together..


everything looks fine in I.E. and FireFox.

Also, how can I line up my form ('Get Advice' Menu Option) again I.E. and FF looks fine.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Yes - Opera is funny with some floats, requiring them to have a width. If you add this:

Code:
width: 100px;

to this rule:

Code:
#menu li

All works as expected.

Incidentally, I can't stress enough how bad I think writing out a CSS file using JS is depending on screen width. If the user has no JS, they see no styling. At very least, default to one, and override with another.

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I have started using the following practice to ensure the code I complete is accessible without javascript (whilst still looking good)...

View the site in Firefox with the Web Developer Tools plugin (I'm certain you will have this installed already)... and from the Disable menu/submenu choose to disable Javascript... and refresh the page. I do the same with CSS and see how that goes.

Like Dan suggests, you may as well set a default (at least) and then over-ride it using JS on page load. That's pretty much the pattern I use too.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
wow - thanks Dan, talk about staring at a blank wall all day yesterday... I have the 100px width applied to the anchor, which was working fine, and understood 'list' elements by default were 100% width of their containing block unless a width is applied to them.

I guess Opera breaks the rule on that one!

I appreciate the heads up on the JS applied CSS , actually I was intending to remove it anyhow, I've decided to go for some JS to make the side divs stay visible as the page scrolls and use position:fixed to the elements, so it works great in FF , Opera and any browser that supports the position:fixed attribute and I.E. will have to use JS until IE7 is released, which isn't long so thought what the hey.

Wow - 1st time i've applied something aimed at all the other browsers and not IE, well it is a bit pants position:fixed not being supported, talk about making like easy when it is, so I'm saying IE is the bad guy on that one :)

once again, thanks for your help, it is very much appreciated.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top