SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast snorky's Avatar
    Join Date
    Jul 2003
    Location
    Great Northwet
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Font renders OK in Opera 7.11 and Netscape 7.02, but not in IE 6.02sp2

    Font renders OK in Opera 7.11 and Netscape 7.02, but not in IE 6.0x. My directive is to code for IE 6 (and later), so other browsers are not especially relevant.

    Here's the site!

    Everything else on this site is fine on IE, but sux bigtime in Netscape & Opera.

    No matter what I've tried, I can't get the font size to change in IE; I've tried changing the "font-size:" to points, pixels, inches - and to various values for each designation. In IE the size never changes, but in Opera and Netscape it DOES change

    ********************

    HTML:

    ....

    <div class="main">
    <p class="quote">
    <img src="images/icons/thoughtfortheday1.gif" width="65" height="40" border="0" style="float:left">
    <!--#include virtual="/scripts/edquotes.js" -->
    </p>

    ....

    ********************

    CSS: (in the order in which they appear in the external style sheet - the only style sheet for this page)

    BODY {
    background-color : #FDF6FD;
    font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size : 9pt;
    color : Black;
    margin : 0 auto;
    padding : 0;
    }

    .Main {
    position: absolute;
    top: 0px;
    left : 133px;
    width : 657px;
    font: sans-serif;
    background-color : White;
    padding : 8x;
    border-left-color : Purple;
    border-left-width : 2px;
    border-left-style : solid;
    }

    .quote {
    text-align : center;
    font-weight : 700;
    /* font-size : 0.097in; */
    color : purple;
    font-size : 8pt;
    font-family : sans-serif;
    }
    ********************

    JAVASCRIPT:
    <script language="javascript">
    var quote = new Array(51);
    quote[0]="<em>Never, ever give up on a child.</em></br>-- John Stanford";
    ...
    quote[50]="<em>You have to be taught to be second class; you're not born that way.</em></br>-- Lena Horne";
    var now=new Date();
    var num=(now.getSeconds())%51;
    document.write(quote[num]);
    </script>

    (PS: I know that the algorithm for that JavaScript bites; I'm working on a new one)

    ********************
    Snorky
    Bless the little children while they're still too young to hate.
    - Tom T. Hall

  2. #2
    SitePoint Evangelist S7even's Avatar
    Join Date
    Jun 2002
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    points pixels inches etc are all fixed sizes and they don't change with IE.

    Use relative sizes instead. e.g. font-size:100%;

  3. #3
    SitePoint Enthusiast snorky's Avatar
    Join Date
    Jul 2003
    Location
    Great Northwet
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm willing to try that. To what will a relative font-size be relative?

    However, the problem is that no matter what font-size I specify, it always appears the same. it matters not whether the style sheet says the font-size is 9pt or 14pt - IE still shows the same size.

    This leads me to believe that something else is affecting the font-size as it is rendered in IE6.
    Snorky
    Bless the little children while they're still too young to hate.
    - Tom T. Hall

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    I've just had a look at your site from the above link and you have a lot of typing errors and mistakes in your css. You have missed the size units off the end of a lot of your sizes. e.g. you have 50 px or 50 instead of 50px.

    Also most of your font definitions are incorrect as you have used the shorthand version (font) but not supplied enough properties for it to work properly.

    Here are the css validator results of your site, there are about 30 errors to correct:

    http://jigsaw.w3.org/css-validator/v...1&profile=css2

    If I were you I'd work through these first then some of your problems will more than likely disappear.

    Hope this helps.

    Paul

  5. #5
    SitePoint Enthusiast snorky's Avatar
    Join Date
    Jul 2003
    Location
    Great Northwet
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Paul.

    That was quite an education.

    Interestingly, I used TopStyle Lite 2.5 to create the style sheet.

    Some of those oopsies were things that TopStyle did. When I corrected them manually (today, after your help), it let me make the corrections. When I let Top Style re-create the CSS, it made exactly the same "errors" (as observed by the Validator). It did not warn me of problems.

    I was so impressed by the free Lite version that I was going to buy the real meal deal. Now I'm not so sure....

    Also interesting is that nothing seems to have changed in any of the 3 browsers:
    - IE does not render the font size correctly, even though Opera & Netscape do render correctly.
    - Netscape & Opera continue to struggle with code that the Validator passed.
    Snorky
    Bless the little children while they're still too young to hate.
    - Tom T. Hall

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Oh well, it was a good exercise anyway

    That's strange though because when I viewed your page originally the only browser that made any sense was IE6. Mozilla 1.3 and Opera7 were all over the place because they stumbled on the errors because they are much stricter than IE.

    Perhaps you can post a link to the page with the updated CSS we'll take another look

    Paul

  7. #7
    SitePoint Enthusiast snorky's Avatar
    Join Date
    Jul 2003
    Location
    Great Northwet
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Between the time that I posted the message and and now - I made a change in a style that is used near the top of the page: from "font-size:0.11in" to "font-size:8pt"

    That tamed the Netscape & Opera beasts considerably. They still render some stuff oddly, but I'll work on some more universal styles later in the week.

    http://www.ohsd.net/index.shtml
    Snorky
    Bless the little children while they're still too young to hate.
    - Tom T. Hall


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •