View Full Version : Showing Different Text in IE & Opera
ErnieK
08-06-2003, 01:28 PM
Have given up after 5 hours continual trying to fix this. I know that IE does not comply with the standards set.
When I make up HTML page and then view in Opera (and a couple of other browsers), it is exactly what I want.
When I view in IE the text is shown in bold face.
Also in one part (going from bold to normal text) when I insert the [br] code in Opera it line breaks. In IE it is as though I have inserted a[p](<>) code.
I have tried remaking HTMl with/without bold setting in the coding to no effect.
Thoughts in my mind as to why:
Default type face in both browsers could be different (e.g. IE = Arial & Opera = Times new Roman - these are just my examples)
If this is the case, what is the coding for setting a default text no matter what browser is used?
Where would I put this, in a mixed page of bold and normal text?
Or am I (yet again) away off beam?:confused:
Paul Komski
08-06-2003, 05:05 PM
Ernie - can't really comment without seeing the code but assuming there are no errors then there should be no trouble in using either <b> or <strong> tags - and of course their closing equivalents </b> and </strong>
Inserting text between <p> and </p> tags is the most usual default paragraph format - but you can of course default all the way down to just text, with no actual html at all written on an *.html file!!
Email or upload your problem code as you wish.
david eaton
08-06-2003, 07:01 PM
Good question Ernie!
In the 3.2 HTML, the use of a <basefont> tag in the head of a page allowed you to specify the font used. However, this tag has been deprecated in HTML4, and replaced with style sheets.
The easiest (?) way would be to specify a font -family to be used like this in the head of the page.
< style type="text/css">
P{font-family: Times;"times new roman";serif}
(note:- if the font name contains spaces enclose it in quotes)
</style>
Hope that clarifies the mud!:D It took me a long time to get the hang of style sheets, so don't feel too bad about it
David
ErnieK
08-06-2003, 08:47 PM
Dave
Here is the first three lines of my home page. You will see I have it set for HTML 3.2
DOC TYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
html>
title>Ernie's Site</title>
As for your - the 3.2 HTML, the use of a <basefont> what is that? I have never seen any reference to it in the stuff I have read. Should I change this to 4 or leave it at 3.2? (remember I am thick so pick the easiest choice for me :D )
Paul
I have managed to get the problems fixed. BUT do not ask me how.
I just copied the text to the clipboard then cleared the page with the intention of re-writing the whole thing and then re-paste it to check the differences.
(my mind was in a fog by this time and I never thought about starting a fresh document until after I had deleted the text, which has turned out to be a blessing)
But I changed my mind after I had cleared the page and pasted the lot back again and it now looks identical in both browsers :confused: :confused: :confused:
david eaton
08-07-2003, 03:41 PM
No reason to change it, except that you are using the "old" version of HTML. There must be thousands or millions of pages that still do so you are in good company!
My mistake over the basefont tag - it only allows you to specify a font size, not a font.
It seems that the <font> is only included in HTML4 too! Officialy that is. Most browsers would recognise it.
Quick answer - if it works LEAVE IT ALONE!!:D
David
sleddog
08-07-2003, 10:47 PM
You may set a default font face using CSS with either the BODY selector or the wildcard *
Examples:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Page</title>
<style type="text/css">
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
Blah blah
</body>
</html>
Alternately:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Page</title>
<style type="text/css">
* {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
Blah blah
</body>
</html>
ErnieK
08-08-2003, 02:41 PM
Thanks Dave & Sleddog
Sleddog I will get back to you when I have had time to try, and absorb exactly what you say. To start with PHP? could you explain that please.
tweeky
08-08-2003, 03:32 PM
If you are ever in urgent need of help and can't wait for someone to post a reply here you could try the following link.
Web Page Designs For Designers (http://www.wpdfd.com/)
Beginners Guide (http://www.wpdfd.com/resources/Beginners.htm)
This page is updated often, it's links are really good and there are a lot of good tips you might like. The top of the two links requires you have a basic knowledge of web page design. I hope these links help you in the future.
ErnieK
08-08-2003, 06:15 PM
Thanks Tweeky
I have saved the links and will look properly at then later.
sleddog
08-08-2003, 08:13 PM
Originally posted by ErnieK
Thanks Dave & Sleddog
Sleddog I will get back to you when I have had time to try, and absorb exactly what you say. To start with PHP? could you explain that please.
What I posted was HTML, nothing to do with PHP...
When you post a sample of HTML here it won't show up, unless you mung it somehow like putting spaces in the tag like this: < FONT face="ugly" >
Instead, you may include your HTML sample in vB code PHP tags and then the HTML appears in the message as intended, like this:
<FONT face="ugly">
To find out more, when composing a message look at bottom-left and click the link for "vB code". (vB is short for vBulletin, the makers of this bulletin board.)
Paul Komski
08-09-2003, 03:11 AM
sleddog I really do like your elegant examples but, although it was only intended as an example, the use of the font face attribute may confuse things here and is not really recommended (http://babel.alis.com/web_ml/html/fontface.en.html) unless at the development stage it is utilised, in an absense of css, to help unmask deficiencies (http://www.solution-shelf.com/FrontPage/HowTo/UglyFont.htm).
IMO, using CSS is THE (or at least one) way to go - particularly if you want to give a consistent look to all the pages in a website by using a separate css text file for the web. Without getting into anything complicated, just a few lines of simple script can transform all the pages as well as making editing html that much easier. Since all (or most) of the style is set away from the html this can make the body html that much cleaner and thereby easier to edit and easier to spot mistakes.
vBulletin v3.6.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.