...

View Full Version : website works in IE but not Firefox.



Bodger Bowham
05-20-2008, 12:51 PM
Right. My website, http://www.visualimpactuk.com, which I have designed with IE in mind works fine in IE, and I would say it's complete.
In Firefox however, all my images (which are mostly <div> positioned) are in the wrong place. Also my scrollbars don't work.

I realise the scrollbars don't work because FF doesn't allow some javascript.
But how can I position the images so they appear correctly in Firefox without moving them out of place for IE users?

abduraooft
05-20-2008, 01:07 PM
I haven't checked the layout, but to expect a standard behavior, you have to ensure that your document is a standard one. And to do this, first of all you need a valid DOCTYPE (http://www.alistapart.com/articles/doctype/) as the very first line of your document.

oracleguy
05-20-2008, 04:47 PM
In addition that, you are missing a body tag around your content on your main index page.

Unrelated to your current problem: You could also make it so your useless no right click script loads from a external js file so that after the first page it is cached and the same script isn't loaded with each page, which would reduce the file size of all your pages.

Sman5109
05-20-2008, 10:35 PM
It is so nice of you to disable the right click. You have fantastic web design skills ;)

If you didnt notice, that was 100&#37; sarcasm. Dont ever disable the right click! Its annoying and it makes me hate you! Good luck with everything :)

oracleguy
05-20-2008, 11:55 PM
It is so nice of you to disable the right click. You have fantastic web design skills ;)

I'm not condoning the use of those scripts but at least from the user's end, you can prevent those scripts from working. In Firefox for example there is a setting under the content tab (in the options dialog) to prevent javascript from messing with the context menu.

Spudhead
05-21-2008, 12:23 PM
index.html loads index2.html into an iframe.
index2.html loads index3.html into an iframe.
index3.html loads home.html into an iframe.

This is not the way to center content on a page. Learn CSS. Stop using iframes for layout. Stop using images of text for navigation, stop using outdated javascript that doesn't work cross-browser and, above all else, stop designing with IE in mind. Your life - and your website - will be greatly improved.

VIPStephan
05-21-2008, 01:17 PM
I can only second what the others have said but I have to add something for further clarification:

Firefox (as well as Opera, Safari, Konqueror, among others) shows you just what you have coded. If there’s something wrong in Firefox it’s because there’s something wrong in your code, not because Fx is stupid. Internet Explorer tries to make a sense out of what you’ve written and lets you slip through with errors but that’s not right because it will never force you (or anyone) to write proper code.

And in case you didn’t notice: The browsers I mentioned are more than the ones you were talking about. And funnily Internet Explorer is the only one that displays it as you want so clearly, it should come to you that IE can’t be the only one that’s correct. Rather, it’s vice versa: IE is the only one that’s wrong.

Sman5109
05-22-2008, 05:40 AM
And funnily Internet Explorer is the only one that displays it as you want so clearly, it should come to you that IE canít be the only one thatís correct. Rather, itís vice versa: IE is the only one thatís wrong.

I love the way you said that :D

Bodger Bowham
05-22-2008, 04:53 PM
And funnily Internet Explorer is the only one that displays it as you want so clearly, it should come to you that IE canít be the only one thatís correct. Rather, itís vice versa: IE is the only one thatís wrong.

I have only tested using Firefox and IE.

Besides, Most people use IE. I havn't made this website to be viewed by web designers. IE may be the only browser to be displaying incorrectly, but I'm not going to alter it for Safari, Firefox etc. users and therefore mess it up for the majority who use IE.

I am not a web designer. I know I can make the pages load faster etc in certain ways - but I can't be bothered to learn a language simply to speed it up a little. I am simply making my company's website so people can find us and have instant access to a portfolio

Sman5109
05-22-2008, 07:14 PM
BTW, Im using FF3 and everything seems to look fine....

oracleguy
05-22-2008, 08:31 PM
Besides, Most people use IE. I havn't made this website to be viewed by web designers. IE may be the only browser to be displaying incorrectly, but I'm not going to alter it for Safari, Firefox etc. users and therefore mess it up for the majority who use IE.

This isn't 2002, not only web developers use something other than IE. What about people using computers where IE doesn't exist?

If you make it work in everything but IE usually you need none to small adjustments to make it work in IE the same as the others. For IE you can apply a second stylesheet using conditional comments that implements the minor fixes to get IE working right but will not effect standards compliant browsers.

Bodger Bowham
05-23-2008, 11:18 AM
BTW, Im using FF3 and everything seems to look fine....

It does look better in FF3 than it does in FF2, but it still isn't perfect.

See, if the website looks different for each version of Firefox, It's hardly going to encourage me to design with this browser in mind.


If you make it work in everything but IE usually you need none to small adjustments to make it work in IE the same as the others. For IE you can apply a second stylesheet using conditional comments that implements the minor fixes to get IE working right but will not effect standards compliant browsers.

I wish I could do that, but I don't understand CSS. I've tried, but I just can't get my head around it.

Sman5109
05-23-2008, 10:44 PM
See, if the website looks different for each version of Firefox, It's hardly going to encourage me to design with this browser in mind.
Thats because FF3 is better then FF2 at displaying faulty/non compatible code. I am so tired of IE corrupting new coders.



I wish I could do that, but I don't understand CSS. I've tried, but I just can't get my head around it.

All you have to do is remove ALL html styling and force yourself to make the page look the same by googling how to do the sames styles in css. Its also about motivation. You dont care about your code being cross-browser compatible so your not going to try.

Avril
05-24-2008, 07:26 PM
The easiest way is to build your site using css stylesheets (simple to learn and easy to do if you take a little time to understand it), and try it out on the web compliant browsers (FireFox, Safari, Opera, Netscape, etc.). If it works on one, it will probably work on the others. After it works as it should on these browsers, make a separate css stylesheet for the dumb IE, and put in a conditional tag to open the site with the IE stylesheet if IE is being used as the browser.

Good luck!

Avril

Apostropartheid
05-25-2008, 04:37 PM
Building up standards-compliant for non-IE is not hard. I've found on many occasions that I sometimes don't even need to add in an extra stylesheet. Coding for IE is a practice which we stopped using ages ago, because about half the world doesn't use IE (guessing, haven't looked at most recent estimates.)

Bodger Bowham
05-28-2008, 12:39 PM
Right, I'll try to learn CSS as best I can in an attempt to fix it.

I've just downloaded FF3 and Opera. I think Opera is awesome.

I still thought that over 80% of the world used IE, see.

Bodger Bowham
05-28-2008, 12:42 PM
So, if I plan to use CSS can I not use ANY html!?

abduraooft
05-28-2008, 12:42 PM
I still thought that over 80&#37; of the world used IE, see. May be, but it's not an excuse for being lazy :)

oracleguy
05-28-2008, 05:22 PM
So, if I plan to use CSS can I not use ANY html!?

No. CSS styles/positions HTML elements, you still use HTML.

Sman5109
05-29-2008, 06:00 AM
No. CSS styles/positions HTML elements, you still use HTML.
That depends If he means HTML styles and is talking about XHTML 1.1. If he was talking about those then the answer is no. You cant use HTML styles in XHTML 1.1, must be CSS.

But then again I highly doubt he was talking about XHTML 1.1 :p

VIPStephan
05-29-2008, 01:44 PM
Donít confuse him any more than he is already.

Look Bodger: Nowadays we follow the practice of the separation of content and styling. Plain HTML is being used to mark up the content semantically (http://boagworld.com/technology/semantic_code_what_why_how/), i. e. you use headlines where they apply, lists, paragraphs, emphasis, and divisions to divide your page into logical sections (e. g. header, content, footer) if and where it really makes sense. Your site will then look pretty plain and all will be read from top left to bottom right.

Now you use CSS to make the plain and ugly page filled with plain information look nicer. Ideally, both, HTML and CSS are totally separate (CSS in external file), you donít use <b></b> HTML elements to make text look bold. Thatís purely presentational and you let CSS do that styling.

The CSS Zen Garden (http://csszengarden.com) is a very good example to understand the logic behind it. It requires a little practicing but itís not as hard as one might think in the beginning and in the end youíll be happy about how simple changes are later on.

Internet Explorer actually doesnít need any special treatment if the initial code is written properly. By testing after each step youíll see what works and what doesnít. IE does have some issues with more modern CSS that might require some workarounds but usually this is only necessary with advanced layouts.

And as oracleguy said even average people are using other browsers than IE. And nowadays websites can be viewed from mobile devices where Opera is the market leader, and from the iPhone which is using Safari as browser. So if youíre a professional company that wants a professional website you canít say ďMeh, people will only use IE anyway so we just ignore the other ones.Ē Youíll lose a decent percentage of potential customers if you think like that.

Bodger Bowham
05-29-2008, 03:18 PM
It is going to take me some time to learn CSS.

For the meantime I have altered my website in a temporary solution to make it work in all browsers (well, I have tested in Opera, Firefox and IE - not sure about Safari)

The code is primitive and a bit messy but it will do for now, just to give me time to learn. Oh and I enabled right click.

If anyone could test it for me using Safari, that would be great. www.visualimpactuk.com

BoldUlysses
05-30-2008, 02:37 PM
I have Safari on both my Mac and PC, and the site breaks in both. It looks as though the bottom text is pushing the right border away from the rest of the container.

FWIW, here are some statistics on browser usage:

http://www.w3schools.com/browsers/browsers_stats.asp

Even if it is inflated, at least 30% of people using FF isn't a trivial slice of the market. But I think that point has already been made...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum