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

Works in IE 6, not in Firefox?

I have an embedded style sheet that works perfect in IE6, and looks
wrong in Firefox 1.7. Here is a link to an online sample:

http://c.1asphost.com/giggy/tree02h/main/default.htm

It works for the most part, in that the text of a Nav Tree becomes
underlined onmouseover. But, when you click an item, it should receive
a Yellow background with a border around it, which it does in IE but
not in Firefox.

How can I get the code to work in both?

Thanks,
Ann

Here are the styles that work in IE and not in Firefox:

<style>
HTML, BODY, TD
{ font-family: Tahoma, Geneva, Arial, Helvetica, sans-serif;
background: #ECEDEF; font-size:11px; }

TABLE.tree_nav
{ border-collapse: collapse; padding: 0; }

TABLE.tree_nav TD
{ padding: 0; }

TABLE.tree_nav_interior
{ border-collapse: collapse; border-spacing: 0px; padding: 0; }

TABLE.tree_nav_interior TD
{ height: 19px; white-space: nowrap; cursor: pointer; padding: 1px; }

TABLE.tree_nav_interior TD.nav_normal
{ color: #333; text-decoration: none; border: 1px solid #ECEDEF; }
TABLE.tree_nav_interior TD.nav_highlighted
{ color: #000; text-decoration: underline; border: 1px solid #ECEDEF; }

TABLE.tree_nav_interior TD.nav_selected
{ border: 1px solid #7A8787; background: FFE99D; }

TABLE.tree_nav_interior TD.tree_nav_off
{ border: 1px solid #ECEDEF; cursor: pointer; padding: 1px; }

IMG.nav_img
{ padding: 1px; }
</style>

Mar 24 '06 #1
6 1819
Giggle Girl wrote:

http://c.1asphost.com/giggy/tree02h/main/default.htm

How can I get the code to work in both?

Fix the HTML validation errors.
Fix the CSS validation errors.
Fix the Javascript errors.

For new pages you should be using HTML 4.01 Strict, not Transitional.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 24 '06 #2
Giggle Girl wrote:
I have an embedded style sheet that works perfect in IE6, and looks
wrong in Firefox 1.7. Here is a link to an online sample:

http://c.1asphost.com/giggy/tree02h/main/default.htm

It works for the most part, in that the text of a Nav Tree becomes
underlined onmouseover. But, when you click an item, it should receive
a Yellow background with a border around it, which it does in IE but
not in Firefox.

How can I get the code to work in both?

Thanks,
Ann

Here are the styles that work in IE and not in Firefox:

<style>
HTML, BODY, TD
{ font-family: Tahoma, Geneva, Arial, Helvetica, sans-serif;
background: #ECEDEF; font-size:11px; }

TABLE.tree_nav
{ border-collapse: collapse; padding: 0; }

TABLE.tree_nav TD
{ padding: 0; }

TABLE.tree_nav_interior
{ border-collapse: collapse; border-spacing: 0px; padding: 0; }

TABLE.tree_nav_interior TD
{ height: 19px; white-space: nowrap; cursor: pointer; padding: 1px; }

TABLE.tree_nav_interior TD.nav_normal
{ color: #333; text-decoration: none; border: 1px solid #ECEDEF; }
TABLE.tree_nav_interior TD.nav_highlighted
{ color: #000; text-decoration: underline; border: 1px solid #ECEDEF; }

TABLE.tree_nav_interior TD.nav_selected
{ border: 1px solid #7A8787; background: FFE99D; }

TABLE.tree_nav_interior TD.tree_nav_off
{ border: 1px solid #ECEDEF; cursor: pointer; padding: 1px; }

IMG.nav_img
{ padding: 1px; }
</style>

Did not search in detail, but a few things that may or may not be of
influence. (I noted Konqueror /did/ display the yellow background)

Not sure if border-collapse is supported by FF. Could Be.
border-spacing I can't even find as a property. Probably IE-only?

The page does not validate, for CSS nor HTML. The Javascript seems to
have some errors as well. (Not sure if it's already supposed to, but the
expand/minimize 'buttons" (- and + signs) don't respond to being clicked
in my FF and Konqueror. I have no IE.)

It would also help if you indented the page properly. It's a mess to
look at right now, doesn't help bughunting. (Prhaps this is related to
My browser and settings, in which case: skip comment)

Wrt CSS, my personal favourite (and widespread I believe) indentation
and use of {} is as follows:

element{
property1 : value;
property2 : value;
}

Look for common denominators. A tad more effort at first, saves a lot of
work later, when changing things.

So if you have:

p.class1{
font-size : 10px;
text-decoration : underline;
margin : 0;
padding : 0;
}

and

p.class2{
font-size : 10px;
text-decoration : bold;
margin : 0;
padding : 0;
}

Combine shared properties:

p.class1, p.class2{
font-size : 10px;
margin : 0;
padding : 0;
}

p.class1{
text-decoration : underline;
}

p.class2{
text-decoration : bold;
}
I also prefer using lowercase HTML tags throughout. XHTML is rapidly
taking over, and it requires lowercase tags!

Attack one issue at a time, you may be looking at a combination of small
glitches/peculiarities. Does the same occur when you remove all
Javascript, tidy the HTML?

A much heard advice from many web developers: never start with IE in
mind. First make it work in more "compliant" browsers, then fix where
necessary for IE. Maybe things will improve with IE7, although I
seriously doubt it.

Good luck!
Sh.
Mar 26 '06 #3
Thank you for your suggestions.

I did find one "error" which I fixed to get the background color in FF.
I was missing a "#" befor the hex color. (Making "background:
FFE99D;" into "background: #FFE99D;" fixed that issue.)

Now the only issue is how come the 1px border gets a little mangled by
FF?

Thanks for the tips!

Ann

Mar 27 '06 #4
Giggle Girl wrote:

I did find one "error" which I fixed to get the background color in FF.
I was missing a "#" befor the hex color. (Making "background:
FFE99D;" into "background: #FFE99D;" fixed that issue.)

Now the only issue is how come the 1px border gets a little mangled by
FF?

Fix the HTML validation errors.
Fix the CSS validation errors.
Fix the Javascript errors.

For new pages you should be using HTML 4.01 Strict, not Transitional.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 28 '06 #5
you need to read a book called css hacks and filters: making style
sheets work http://www.idest.com/csshacks/

Mar 29 '06 #6
Ok, I figured it out. Here is the new URL of a working version:

http://c.1asphost.com/giggy/tree03c/...efault_03c.htm

The "1px border gets a little mangled by FF? was fixed by changing the
border-collapse: of class "tree_nav_interior" to "separate", as in:

TABLE.tree_nav TD TABLE.tree_nav_interior
{ border-collapse: separate; ...}

FF interprets the "interestingness" of different borders meeting
different than IE I guess...

Anyway, it looks good now.

Thanks to Schraalhans Keukenmeester for your advice...

Sincerely,
Ann

Apr 3 '06 #7

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

Similar topics

14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
5
by: Derek Erb | last post by:
I am banging my head against the wall with this one. The following code snippets work perfectly fine in MSIE6. But produce an error in Firefox and do not work at all. BROWSER.HTM <HTML> .......
11
by: lkrubner | last post by:
We are working on a website that is here: http://www.lauradenyes.com/ The site was working till I put up an .htaccess file that was suppose to redirect all html files to the PHP parser. The...
14
by: David Blickstein | last post by:
I have some XML documents that I want to open in a web browser and be automatically translated to HTML via XSLT. I'm using an xml-stylesheet processing command in a file called "girml.xml". ...
3
by: KBuser | last post by:
I recently developed an internal website with various queries against our SQL server. I added buttons with Response.Redirect. These buttons do not work with Internet Explorer, however when using...
4
by: puja | last post by:
hi all, I have an asp.net website where am including .css file dynamically on page load event. For diff users, there is diff CSS file. So after user logs in, I am setting CSS href on page load....
28
by: entfred | last post by:
I have the following line of html: &nbsp;&nbsp1234&nbsp;&nbsp;&nbsp;&nbsp;&nbspabc&nbsp;&nbsp;&nbspyow In Internet Explorer 6.0, the columns look ok using the above html: 1234 abcd ...
3
by: Arodicus | last post by:
I have a static class method, MyObject.MySub.MyMethod(), which points to a handler in a Flash SWF (but I think that's inconsequential). In reality, the path is a lot longer, so I'd like to make a...
13
by: Stever1975 | last post by:
I'm working on something similiar to a shopping cart item page. There is a table of items. Each item has an image, a textbox for the qty and an image for the add button. When the add image is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...

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.