forums Computer Tutorials Computer Help and Spyware Removal File DatabaseUninstall Database Windows Startup Programs Database Computer Resources Computer Glossary Forums Computer Help and Spyware Removal
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Handling Browser Compatibility
Extrodewise
post Mar 14 2008, 10:23 AM
Post #1


Member
**

Group: Members
Posts: 40
Joined: 24-October 07
Member No.: 165,199



Hi guys. Anyone got an idea of how to make my HTML look the same in the browsers commonly used: IE, Firefox, Opera. It looks good in IE7 but when viewed with firefox, all my links are underlined; haven't tested with Opera and others yet. What's responsible for the underlining of the hyperlinks in Firefox? What can make the code universal (look the same in all browsers). I use FrontPage 2003.
Go to the top of the page
 
+Quote Post
groovicus
post Mar 16 2008, 09:01 AM
Post #2


Hail Groovicus!
******

Group: Site Admin
Posts: 5,672
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



All browsers render things differently, although they really shouldn't. As a result, things look slightly different.

QUOTE
What's responsible for the underlining of the hyperlinks in Firefox?

There is a parser that reads the HTML. How they choose to parse the HTML depends on what rules they (the developers) decided to follow.

To answer your question though (even if a bit late):
CODE
<a href="http://www.google.com/" style=" text-decoration:none;">Google This</a>


--------------------
Go to the top of the page
 
+Quote Post
Extrodewise
post Mar 16 2008, 01:10 PM
Post #3


Member
**

Group: Members
Posts: 40
Joined: 24-October 07
Member No.: 165,199



Sorry pal but I dont know exactly what you want me to do with that code. Could you explain please, Thanks.
Go to the top of the page
 
+Quote Post
groovicus
post Mar 16 2008, 01:24 PM
Post #4


Hail Groovicus!
******

Group: Site Admin
Posts: 5,672
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



You are going to have to manually edit your hyperlinks to include style=" text-decoration:none;". That bit of code is what you need to use remove the underlines from your hyperlinks. I gave you an example of what a hyperlink would look like with the code added.


--------------------
Go to the top of the page
 
+Quote Post
Extrodewise
post Mar 16 2008, 01:53 PM
Post #5


Member
**

Group: Members
Posts: 40
Joined: 24-October 07
Member No.: 165,199



Alright Pal, thanks once again.....Hail Groovicus!
Go to the top of the page
 
+Quote Post
pislkie
post Apr 8 2008, 01:19 PM
Post #6


Member
**

Group: Members
Posts: 17
Joined: 8-April 08
Member No.: 201,755



IMHO, you are working the wrong way round
Just about all the designers that I come accross validate their evolving pages in Firefox which is more Standards Compliant than most. You can also integrate a plugin that validates the code as you go. When it works OK in FF, then sort out the quirks in the less compliant IE7 or IE6.

The other major compatibility factor is to use the right DTD and make sure your code complies with the declaredstandard.


--------------------
>>>piskie<<<
Go to the top of the page
 
+Quote Post
Extrodewise
post Apr 9 2008, 07:21 PM
Post #7


Member
**

Group: Members
Posts: 40
Joined: 24-October 07
Member No.: 165,199



Thanks 'pislkie' but I dont think I understood a word of what you wrote up there. Could you please break it down into more absorbable points. Look at it as if you're talking to a newbie. I think you have a powerful point, only I can't seem to place my finger on the point. Waiting to hear from you.
Go to the top of the page
 
+Quote Post
pislkie
post Apr 11 2008, 07:15 PM
Post #8


Member
**

Group: Members
Posts: 17
Joined: 8-April 08
Member No.: 201,755



OK, let me explain myself a bit.

Not all browsers display a page the same way.
This is because they interpret the various display blocks (eg div etc) in different ways
This is true even when the code is 100% standards compliant
This particularly applies to IE in all its versions
Furthermore, there are different standards to be compliant with.
You declare which standard your page will comply with by using a "Document Type Declaration" (DTD)
Of all the current browsers in common use today, Firefox is (IMO) the most standards compliant
Consequently, designers tend to review their designs as they evolve in Firefox
This will frequently leave glitches in other less compliant Browsers such as IE
Before signing of a page, it is therefore necessary to introduce "Fixes" to overcome the inconsistencies.

DTDs are a vital part of cross Browser performance and Standards in general.
If you don't include a DTD at all, most Browsers display in what is commonly called "Quirks Mode"
Quirks Mode is a way browsers display making allowances for Non Standards Compliance.

There is much information on Design and DTDs on the net just search in Google and you will find many good articles.
The W3C slant on DTDs can be found HERE
This is very comprehensive and will demonstrate the complexity of the issue.
I favour and recommend you to start using:
QUOTE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

This particular DTD says that the page is coded in HTML version 4.01 and references the W3C page that contains that coding standard definition.

All very complicated and a lot to absorb, but if you are to make your life a bit easier regarding cross browser campatibility, it has got to be understood to some degree.

I hope this cleared some of mist up for you and didn't just make things more complicated. The important thing to grasp, is that Browsers don't all display any given page the same. Further a particular Browser will display the same page differently if the DTD is changed. Hence it is VITAL, that the DTD matches the particular Standard that you used when making your pages. From experience, have found the DTD that I quotes above to be the best starting point because it relates to HTML v4.01 which is long established and widely understood.

One last point to further muddy the waters, a DTD that references a URL standard will have a different effect on a Browser to one that does not use a URL reference.


--------------------
>>>piskie<<<
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 5th July 2008 - 12:06 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.