473,406 Members | 2,956 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,406 software developers and data experts.

CSS Firefox Problem (Float I think!)

Hi,

Am pretty new to CSS & Tried to use it...all is fine with IE but when view through firefox it goes horribly wrong. Please help!


http://www.electronicsinthehome.co.u...o?productID=41

Thanks in advance!

KK
Apr 12 '06 #1
5 15822
Banfa
9,065 Expert Mod 8TB
Ok part of the problem is that you have set your layout using IE, however your DOCTYPE,
[html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">[/html]
is wrong it should be
[html]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">[/html]

Because you have the doctype wrong IE runs in quirks mode and uses the broken box model of IE 5. You have adjusted your layout to work in IE using this broken box model so when you display it in a browser that uses the correct box model it looks wrong.

W3C infomation on DOCTYPEs here http://www.w3.org/QA/2002/04/valid-dtd-list.html

However that is not the only problem, if you want you code to work in standards complient browsers then you need to write standards complient HTML, use the W3Cs validator to check this here

http://validator.w3.org/

You have over 100 errors in your page.

The mix you have of tables and CSS for layout is very very confusing I would use 1 or the other (personally I would use CSS for main layout and only use tables for what they where intended, small items of related data as in a data table).

And finally you are experiencing a "float" problem which can be eased by using the css property "clear" (see help here http://www.w3schools.com/css/pr_class_clear.asp ) this property lets you specify that the element with it does not have any floating elements to it's left or right.

I would take these steps
  1. Correct your DOCTYPE
  2. Validate your HTML and fix all errors
  3. Redesign your layout making it simpler

I might do 2 and 3 the other way round.
Apr 12 '06 #2
thank you very much, I will begin straight away...
Apr 12 '06 #3
I find it interesting that Firefox doesn't load the .css file, which I am also experiencing at my website, and the answer is to make the site w3c compliant?

What does that have to do with Firefox's inability to load a .css file? We're talking about loading it and intrepreting the valid css styles, not whether depricated tags are being used or </tr> tags are found without an initial <tr> tag.

There is something seriously wrong with Firefox if it can't load a file.

Would someone try to answer the load question by itself? There must be something in the syntax of the load; path referencing; slash orientation (\ vs /) Something that we can use to solve what is becoming a big problem in several posts.

Thanks,
Paul
Jul 24 '06 #4
Banfa
9,065 Expert Mod 8TB
I find it interesting that Firefox doesn't load the .css file, which I am also experiencing at my website, and the answer is to make the site w3c compliant?
I have not said that Firefox does not load the file, I have said that if you do not follow the standards then you will have trouble making the various browsers all interperate the HTML and CSS in the same way.

The best (well only) way to get good cross browser support is to write standard compilient code as they will all be able to interperate it and they will (mainly) all interperate it in the same or very similar way.

If you do not follow the standard (and if fact a hanging open tag rather than a spurious closing one is harder to deal with) or have code with mistakes in it then you are likely to set-up a situation where the browser can not tell which style you want applied to which element.

One of the main reasons for this standardisation is to make the browsers job simpler, the rules are set in stone (as it were) and are relatively easy to follow if the standards are being followed. Before the standards all the different browsers basically had there only slightly different version of HTML and IE5 was particularly bad since it used it's own slightly different version of CSS standard.

I can not stress enough that the only way to get good HTML and CSS working in multiple browsers is to follow the standards and that once you get in the habit this is not very hard to do(and that there are untilities to help you convert your current code although sometimes these can make a big mess of things).

You should always
  1. Use a valid doctype
  2. Validate your html
Jul 25 '06 #5
jmonit
1
Hello there,

I am facing a problem with Css float. it doesnt seem to work in firefox can you help me out

heres my URL

http://www.freeezdeesigns.com/monit/even/index.html

Looking forward to your reply

Best Regards

Monit
Aug 21 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Wolfgang Meier | last post by:
Hi, Although it might seem like I am firing out random posts in quick succession this matter is indeed one I thought about for quite some time without coming to a conclusion: Why is it that...
5
by: BJ | last post by:
Hi, I add label and text box fields dynamically in code using C# and ASP.NET. I set the width of the label using: Label label = new Label(); label.Width = 20; label.Text = "Test";...
2
by: ars | last post by:
hi everyone i'm using some regular expression to paging, it work's fine in IE but not in Firefox i removed every thing to detect problem but i Can't , the only thing i got, is the innerHtml doent...
4
by: Mark | last post by:
I have developed a generic list-based css menu. It works both in IE7 and Firefox, and with the help of Peter Nederlof's csshover.htc, with older IE versions. I have included a simplified version...
9
by: vighnesh | last post by:
Hi Folks Greetings to you all. I have been dealing a project, in which one of the requirement is to clear FireFox browser history programatically. Can anybody suggest me, how this can be...
6
Kimpossible
by: Kimpossible | last post by:
Hi, This is my first post. I'm trying to do a web site in all css for a change, I usually do tables. I'm starting from the top of the page and formatting as I go. The problem I'm having is with...
2
by: honey99 | last post by:
Hi! can anybody tell me how to remove horizantal scrollbar for <textarea> in firefox,i think firefox takes horizantal scrollbar by default.....and i want to display vertical scrollbar for <textarea>...
2
by: honey99 | last post by:
I have a problem,that Onchange event is not working in firefox i think.......here is my code...shall i need to change anything ?? onchange='document.getElementById("abc").src=this.value' Thanks
2
by: Tom Brown | last post by:
I can't seem to get float to work at all in Firefox, but it works just fine in IE7. I'm using FireFox 2.0.0.6. This seems so basic I can't believe it is a bug, but I just can't understand why it...
2
by: firstexact | last post by:
Hi guys, First post, hope you can help, I have done two sites www.trisant.co.uk and my own www.firstexact.co.uk. The 2 x 2 grid I originally envisaged goes haywire in Firefox as I get a 4 high by...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.