Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS Problems

CSS Problems
Thread Tools
cElls
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 5, 2001, 05:24 PM
 
1. My site looks fine on Explorer for OS X and Windows, but on Explorer for OS 9 the fonts are way too big. I guess it has to be an error in my stylesheet, because when I used normal font tags, it looked fine on any browser. Does anyone see an error?

2. Since I changed my font tags to h1 and h2 tags (which are defined in the stylesheet), my line breaks are the size of an h2. How would I define the br tag in the stylesheet?

My stylesheet, which validates BTW: http://www.chrisellsworth.net/stylesheet.css

Thanks,
Chris
     
Raman
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Dec 5, 2001, 05:40 PM
 
Maybe this is why your site's font's look huge: Because they are!!

18px, 48px

and trebuchet-ms? why you know not alot of mac computers probably wont have that font so its just going to pick a sans-serif font.

also, you might be telling your browser to show the font larger/smaller than they are supposed to be
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 5, 2001, 05:53 PM
 
Originally posted by Raman:
<STRONG>Maybe this is why your site's font's look huge: Because they are!!

18px, 48px

and trebuchet-ms? why you know not alot of mac computers probably wont have that font so its just going to pick a sans-serif font.

also, you might be telling your browser to show the font larger/smaller than they are supposed to be</STRONG>
I have looked at the site on multiple computers. I think the problem is that IE for 9 uses 72 dpi, and IE for X and Windows uses 96 dpi.

Regarding Trebuchet MS, all Macs with IE 5 and PCs with 5.5 or later have it.

-Chris
     
timster
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Dec 6, 2001, 01:33 AM
 
You've run into the sad truth that even with CSS, browsers have different ideas of what is a certain font size.

When working at my last job - i was tasked to develop a CSS sheet that would work on 6 different browsers/versions on 3 different operating systems.

IE 4.0, 4.5, 5.0 on PC and Mac
NN 4.0, 4.7, and 6 on PC and Mac
NN 4.7 and 6 on X-win.

I found out that theres no single "magic" CSS specification that gets you the same results on all those browsers, especially when it comes to font sizing.

So to resolve the problem, I had to develop a browser sniffer in javascript that would determine the operating system/browser type, then load a CSS stylesheet that was tweaked for that particular browser/operating system combination.

I had to develop five different CSS sheets to cover all variants above.

-tim
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 6, 2001, 08:36 AM
 
Thanks for the info. I guess I'll either use smaller fonts, or use font tags.

-Chris
     
timster
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Dec 6, 2001, 12:28 PM
 
Font tags dont always come out the same, and that just removes all benefits of using CSS.

CSS may have its issues, but it's still a very nice and powerful feature to implement with your site.

You should be able to twiddle with your CSS settings and come across a set of settings that work pretty closely on all browsers, and lean the results towards favoring the most popular browsers (IE 5.0 and NN 4.7, 6.0) and ignore the rest. You may not get the exact same visual results on all browsers, but it should be good enough, and HTML never was an exact science anyway.

-tim
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 6, 2001, 05:03 PM
 
I made my font sizes a little smaller. Now they're 16px and 24px. It doesn't look too bad.

-Chris
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 6, 2001, 05:06 PM
 
Oh yeah, one more thing. Does anyone know how to define a line break in the stylesheet?

-Chris
     
nitram_again
Junior Member
Join Date: Nov 2001
Location: australia
Status: Offline
Reply With Quote
Dec 16, 2001, 10:35 AM
 
HTML never was an exact science anyway.
Just make everything (text and all) one giant image. Then everyone will see your page the way YOU wanted them too.


But seriously folks, my techno-illiterate in-law just made a few pages using MS Publisher's "publish to web" wizard, and some of the pages are exactly that: one giant GIF, text and all. Just when i thought i'd seen everything, MS throws in a new one.

And one more thing: which fonts get installed with IE on the Mac?
_ _ _ _____________ _ _ _
Martin
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 16, 2001, 11:53 AM
 
Actually, a long time ago my site was just one big jpeg with an imagemap for each page... hehe.

I believe the fonts that get installed with IE are Verdana, Comic Sans MS, Times New Roman, Trebuchet MS, and Courier.

I'm probably gonna redesign my site anyway, I'll see what I can do.

-Chris
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Dec 16, 2001, 01:42 PM
 
Originally posted by cElls:
<STRONG>Oh yeah, one more thing. Does anyone know how to define a line break in the stylesheet?</STRONG>
Depends. What is it you want to do?

If you justwant to define an item that has a line break after it, that's easy. Give it the property display:block and you're all set.

If, on the other hand, you want something more akin to the BR tag, there isn't anything (it's the one HTML tag that can't be duplicated with CSS yet). Just use a BR tag; this is part of why it wasn't deprecated along with the other presentational cruft (the other reason being that in some written works -most notably poetry- linebreaks really are an important part of content and structure, and not just an arbitrary presentational matter).
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 16, 2001, 02:52 PM
 
I see.... I guess I'll use font tags for now.
     
slimshady023
Forum Regular
Join Date: Apr 2000
Location: California
Status: Offline
Reply With Quote
Dec 19, 2001, 03:14 AM
 
Hey Chris,

I just saw your post today. I am not a CSS expert, but I see a difference between the setup of your scripts compared to mine. Should there be a period before the "h1" and another before the "h2" in your sheet?

As for the returns, I usually manually insert a &lt;br&gt; in the html code wherever I need it. Besides this, I have not found nor looked into other ways of fixing this. I have included an example of a working css that I have used without problems, and hopefully you can alter or copy it to your needs.

Anyway, I hope this helps. Later!
- Slim

--------------

&lt;style type="text/css"&gt;
&lt;!--
BODY {text-decoration: none; font: 10px Verdana, Arial, Helvetica, sans-serif; color: #000000;}
A:link, A:visited, A:active { text-decoration: none; font: 11px Verdana, Arial, Helvetica, sans-serif; color: #000000;}
A:hover { color: #ff9900; }
.HT1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; color: #000000;}
.HT2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; font-weight: normal; color: #000000;}


--&gt;
&lt;/style&gt;
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Dec 19, 2001, 08:52 AM
 
I don't see any h1 or h2 tags on your site anywhere; that's why your styles aren't taking effect.

Also, though your markup validates, it's quite non-structural and comparatively difficult to follow; you might want to consider cleaning it up a bit.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
cElls  (op)
Forum Regular
Join Date: May 2001
Location: New York
Status: Offline
Reply With Quote
Dec 19, 2001, 05:09 PM
 
Originally posted by Millennium:
<STRONG>I don't see any h1 or h2 tags on your site anywhere; that's why your styles aren't taking effect.

Also, though your markup validates, it's quite non-structural and comparatively difficult to follow; you might want to consider cleaning it up a bit.</STRONG>
I removed the h1 and h2 tags, they made the site look really weird. I'm just sticking with font tags for now.

What do you mean by cleaning up the code? Adding indents ad stuff?

-Chris
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:36 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,