Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, 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.

Photo

Handling Browser Compatibility


  • Please log in to reply
7 replies to this topic

#1 Extrodewise

Extrodewise

  • Members
  • 72 posts
  • OFFLINE
  •  
  • Local time:05:49 AM

Posted 14 March 2008 - 10:23 AM

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.

BC AdBot (Login to Remove)

 


m

#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:49 PM

Posted 16 March 2008 - 09:01 AM

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

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):
<a href="http://www.google.com/" style=" text-decoration:none;">Google This</a>


#3 Extrodewise

Extrodewise
  • Topic Starter

  • Members
  • 72 posts
  • OFFLINE
  •  
  • Local time:05:49 AM

Posted 16 March 2008 - 01:10 PM

Sorry pal but I dont know exactly what you want me to do with that code. Could you explain please, Thanks.

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:49 PM

Posted 16 March 2008 - 01:24 PM

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.

#5 Extrodewise

Extrodewise
  • Topic Starter

  • Members
  • 72 posts
  • OFFLINE
  •  
  • Local time:05:49 AM

Posted 16 March 2008 - 01:53 PM

Alright Pal, thanks once again.....Hail Groovicus!

#6 pislkie

pislkie

  • Members
  • 17 posts
  • OFFLINE
  •  
  • Local time:05:49 AM

Posted 08 April 2008 - 01:19 PM

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<<<

#7 Extrodewise

Extrodewise
  • Topic Starter

  • Members
  • 72 posts
  • OFFLINE
  •  
  • Local time:05:49 AM

Posted 09 April 2008 - 07:21 PM

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.

#8 pislkie

pislkie

  • Members
  • 17 posts
  • OFFLINE
  •  
  • Local time:05:49 AM

Posted 11 April 2008 - 07:15 PM

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:

<!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<<<




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users