473,791 Members | 3,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_highligh ted
{ 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 1834
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_highligh ted
{ 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_inter ior" to "separate", as in:

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

FF interprets the "interestingnes s" 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
5486
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 that works well as an html page. It brings up a modal popup window that I have been trying to work out for days now and this was the closest I have been able to come. I added a little asp.net code and an asp.net button and cannot get it to
5
31227
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> .... <div class="Abb"> <h2 id="ABTit">BROWSER</h2> </div>
11
2366
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 site then stopped working, because I had the address of the PHP parser wrong. I then deleted the .htaccess file, and the site began to work again. However, on one machine it still does not work in FireFox.
14
24241
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". This all works in Internet Explorer, but doesn't work with Firefox. In both IE and Firefox this works: <?xml-stylesheet type="text/xsl" encoding="UTF-8" href="makehtml.xslt" version="1.0"?>
3
3397
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 Firefox the page works flawless. Does anyone know why this is happening or how to fix it?
4
2302
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. My CSS file works fine in IE 6.0 when i specify the absolute path. eg- href ="D:\Mywebsite\css\mycssfile.css" but this full path does not work in firefox 1.5.0.5. When I load page in firefox, css file seems to have no effect on page. If I...
28
13207
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 yow But, in firefox, for same html, getting this:
3
1765
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 simpler way for other programmers to access that method, such as this: var MyFunc = MyObject.MySub.MyMethod So they could just call MyFunc() instead. This "proxy" or "shorthand" works great in IE, but fails in Firefox/Safari and sometimes even...
13
3749
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 clicked it adds the item to the cart array and sums it if the item already exists in the cart. This code works perfectly fine in Internet explorer and firefox, heck I even tested it in chrome and it works. So everything works fine in all browsers...
0
9669
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
9517
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
10428
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
10207
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...
0
9997
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
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
5435
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
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.