473,395 Members | 1,670 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,395 software developers and data experts.

MSIE6/Netscape7/Firefox1 CSS problem

Hi,

Although I appreciate that Netscape/Firefox implement CSS more
according to the rules than MSIE does, I am having a problem getting
Netscape etc to display a page as I would like.

Have a look at http://www.tannerritchie.com/test2/ in different
browsers.

I have set up a simple browser sniffing script which directs the user
to a different style sheet in the root directory according to their
browser (sitestyle.css for MSIE, mozillastyle.css for others), however
the Netscape version still does not look how I would like it.

The problem area is the left hand vertical navigation bar, where I am
using links which change when the mouse pointer is placed over them. In
MSIE it looks how I want it. In Netscape I have tweaked it to look
adequate, but still not good. The code used in the right hand
navigation bar (catalogue) is the same as I use in the MSIE stylesheet,
and you can see it creates a real mess.

Can anybody suggest a way to make the left hand navbar look the same in
Netscape/Mozilla, etc., as it does in IE?

Many thanks

Fred Smith

Jul 21 '05 #1
7 1653
sp********@tannerritchie.com wrote:
Have a look at http://www.tannerritchie.com/test2/ in different
browsers.

I have set up a simple browser sniffing script which directs the user
to a different style sheet in the root directory according to their
browser (sitestyle.css for MSIE, mozillastyle.css for others)


.... and nothing for Opera, Konqueror, Safari, or any browser which doesn't
claim to be IE or Netscape. You would be better of writing one sensible
style sheet and then applying hacks as needed to work around browser bugs.
(I find that very few such hacks are needed).

I note that your choice of Doctype triggers Quirks Mode in browsers. Among
other things, this causes MSIE to get padding and border wrong (putting
them inside the width) and to apply the width property to inline elements
(like <a>). It is this last bit that I suspect is causing your problems (I
can't be bothered to get my Windows PC working to test in IE).

See http://css.maxdesign.com.au/listamatic/ for a bunch of prewritten and
tested style sheets that I believe get the effect you want on your list of
links.

I also urge you to pick a unit more apropriate for use on the screen for
your font sizes then "pt". http://css-discuss.incutio.com/?page=UsingPoints
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #2
sp********@tannerritchie.com wrote:

I have set up a simple browser sniffing script which directs the user
to a different style sheet in the root directory according to their
browser (sitestyle.css for MSIE, mozillastyle.css for others), however
the Netscape version still does not look how I would like it.
So now you must update two files for every one style change. Bummer.
How would you like it to look? I do not feel like booting to Windows
just to find out. I suspect I know, and it is doable with a single CSS file.
The problem area is the left hand vertical navigation bar, where I am
using links which change when the mouse pointer is placed over them. In
MSIE it looks how I want it. In Netscape I have tweaked it to look
adequate, but still not good. The code used in the right hand
navigation bar (catalogue) is the same as I use in the MSIE stylesheet,
and you can see it creates a real mess.

All that and I still do not know what you want besides "look the same."

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #3
Dear David,
Many thanks for the advice. I did actually check it on Opera (which
seems to behave exactly like IE, and provides IE when userAgent is
requested in JavaScript), and create a fall back for other browsers.
I'll plead guilty to not having looked at Konguerer or Safari yet,
although that's not because I have it in for their users!

I'm keen to use the best CSS possible, and the hack was a temporary
solution only. It looks like a different doctype may be the solution -
which will mean I have to clean up my HTML too. Oh dear.

Best wishes,
Fred Smith

Jul 21 '05 #4
Thanks for the reply. The idea is to use CSS for 'button rollovers' in
a vertical navigation bar. I have solved half the problem in that I
realised that I had to set the links to behave as block, not inline.
Inexperience showing. I am still getting discrepancies though, and
David Dorward above has suggested doctype.

Best wishes,

Fred Smith

Jul 21 '05 #5
> I also urge you to pick a unit more apropriate for use on the screen
for your font sizes then "pt".
http://css-discuss.incutio.com/?page=UsingPoints


.... oh and point taken (ho ho) about points. I'll convert to ems ...

FS

Jul 21 '05 #6
sp********@tannerritchie.com wrote:
Thanks for the reply. The idea is to use CSS for 'button rollovers' in
a vertical navigation bar. I have solved half the problem in that I
realised that I had to set the links to behave as block, not inline.
Inexperience showing. I am still getting discrepancies though, and
David Dorward above has suggested doctype.

What discrepancies?
The list site David recommended is excellent. A lot a good ideas and
implementation hints there.
<http://hsivonen.iki.fi/doctype/> was recommended by Steve Pugh in
another thread for further doctype info.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #7
sp********@tannerritchie.com wrote:
I also urge you to pick a unit more apropriate for use on the screen
for your font sizes then "pt".
http://css-discuss.incutio.com/?page=UsingPoints


... oh and point taken (ho ho) about points. I'll convert to ems ...


Where font-size is concerned, % and em are equivalent, but I recommend
using % instead, mainly because of some bizarre em behaviors in WinIE.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #8

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

Similar topics

4
by: Jeffrey Silverman | last post by:
I am tearing my hair out trying to reproduce a problem. The one client user who has this problem is running IE6 on WinXP Pro. I tried reproducing the problem in Opera, Mozilla, IE5 on Win2k, IE6...
2
by: Jeffrey Silverman | last post by:
First of all, I apologize for multiposting. I am now reposting and crossposting in an attempt to reach a broader audience. Here is the original posting... (with some small changes) I am tearing...
0
by: Bruce Davis | last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded tkinter gui application. The problem appears to be a deadlock condition when a child thread pops up a Pmw dialog window in...
0
by: Pavils Jurjans | last post by:
Hallo, Sorry for cross-posting, but in this case it's really a cross-field problem here: Please have this ASP code for your consideration: /////////// ASP code stars here ///////////...
11
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
3
by: Dade Murphy | last post by:
Hi everyone! I've got a little problem and just cann't find any solution for it: I need to get the current position of the mousecursor at my webpage for some overlay stuff. Currently I use the...
4
by: Lynn | last post by:
I have been going round in circles trying to get this to work..... I have a form with many fields, each with an onchange() event. There is also an onclick event on the form Submit button. If one...
19
by: Mason A. Clark | last post by:
How was I to know that "top" means "top" in MSIE6 ?? I was testing <a name="top"></a> at the top of the page with <a href="#top>go to top</a> at the bottom of the page. It always worked in...
4
by: Mason C | last post by:
My MSIE 6 posts a warning at the top: "To help protect...." to block scripts and ActiveX (it says). It is blocking my .CSS --there's no blockage if I kill the link to CSS. What can be in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.