[thelist] CSS 'line-height' and Crossplatform...

matt newell matt at sweetillusions.org
Wed May 16 13:39:57 CDT 2001


here's some code :

// Replace your " with ' or \" or your document.write statements will fail
  if (navigator.appName.indexOf('Netscape') != -1)
 document.write(' <link rel="stylesheet" type="text/css"
href="mainstylens.css"> ');
  else
 document.write(' <link rel="stylesheet" type="text/css"
href="mainstyle.css"> ');


i was basing it off of navigator.appName .. but you may feel the need to use
some other variant for your own use (in this case .. mac v. pc?) if that's
your case:

     if (navigator.appVersion.indexOf('Mac') != -1)
          document.write('whatever here for mac')
     else
          document.write('<script language="JavaScript1.2"
src="../js/body_code_smbiz.js"          type="text/javascript"><\/SCRIPT>')


the usual biggest difference in css is between netscape(4ish) and ie .. as
netscape(6) shows css as accurate as ie seems to ....

yea, it requires two css files, but there are only small changes between the
two -- and it still beats the hell outta font tags ... :)

hth,

        .. matt

        .. www.sweetillusions.org
        .. matt at sweetillusions.org

        .. in our madness evermore we rave - chaucer

----- Original Message -----
From: "Morbus Iff" <morbus at disobey.com>
To: <thelist at lists.evolt.org>
Sent: Wednesday, May 16, 2001 11:34 AM
Subject: [thelist] CSS 'line-height' and Crossplatform...


: I started working with CSS relatively recently, so I'm still fighting some
: crossplatform problems. The current one which I haven't been able to work
: around is related to the 'line-height' portion of CSS. Without this
: line-height, the lines look squished together in IE 5 on Windows. They
look
: similar, but better on various Mac browsers...
:
: Knowing what paragraphs looked like when I used *no* CSS, I set out to try
: and duplicate it. On IE 5, I discovered that a line-height of 1.3 did
quite
: nicely - almost exactly mirrored a non-CSS line height. As soon as I got
it
: on the Mac though, the line spacing was horrible - far too spacy for my
: tastes (tested in IE 5 and the latest iCab).
:
: On the Mac, if I set it to 1.2, it looks pretty good, but looks squishy on
: IE 5 for Windows. Blarg.
:
: Whatever shall I do? <g>...
:
:
:
:
: ---------------------------------------
: For unsubscribe and other options, including
: the Tip Harvester and archive of TheList go to:
: http://lists.evolt.org Workers of the Web, evolt !
:





More information about the thelist mailing list