Body not inheriting style from external CSS

H

Harlan Messinger

Lanmind said:
Hello all,

I tried posting this in another HTML group but its not going through.
My problem is that the body of my HTML is not inheriting the body
style from the external CSS page. Any pointers is thanks : )

Page- http://www.dockhawk.com/

External CSS- http://www.dockhawk.com/default.css

Rather than making us guess, could you tell us what you're seeing that
differs from what you expected to see? Your rules for the body include
one that sets the background color to white--and the background color is
white--and two that set font properties--but you have no text on your
page, except for the label on the submit button and any text I type into
the field, which does look like 11px Arial (though you shouldn't
normally set font sizes in terms of pixels).
 
H

Harlan Messinger

Lanmind said:
Hello all,

I tried posting this in another HTML group but its not going through.
My problem is that the body of my HTML is not inheriting the body
style from the external CSS page. Any pointers is thanks : )

Page- http://www.dockhawk.com/

External CSS- http://www.dockhawk.com/default.css

By the way: tags aren't part of the CSS, they're part of the HTML--and
you're using the LINK tag in the HTML to reference the external style
sheet. Remove the

<style type=text/css>

and

</style> from your external sheet.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Lanmind <[email protected]>
writing in @a18g2000pra.googlegroups.com:
Hello all,

I tried posting this in another HTML group but its not going through.
My problem is that the body of my HTML is not inheriting the body
style from the external CSS page. Any pointers is thanks : )

Page- http://www.dockhawk.com/

External CSS- http://www.dockhawk.com/default.css

External stylesheets do not have HTML elements, remove the <style
type="text/css"> and </style>.
 
L

Lars Eighner

In our last episode,
<d004ab43-6088-41e7-95ed-34bd18041077@a18g2000pra.googlegroups.com>,
the lovely and talented Lanmind
broadcast on alt.html:
Hello all,
I tried posting this in another HTML group but its not going through.
My problem is that the body of my HTML is not inheriting the body
style from the external CSS page. Any pointers is thanks : )

Why do you have html STYLE tags in your external stylesheet?
Is some kind of new IE extension or something> At any rate you advertised
the sheet was css. <style> is not css. It is an html tag. Remove the tags
and see if it works.

You have no DOCTYPE. It appears to me you are trying to write some version
of XHTML. You could not have attempted to validate your document without a
DOCTYPE declaration, and I did not either. Without a DOCTYPE and a valid
document, you will trigger quirks mode, and things may no appear as you
think they should.
 
R

Roy A.

... which does look like 11px Arial (though you shouldn't
normally set font sizes in terms of pixels).

Why not? If you use CSS to set font size in terms of pixels, you
should
end up with a something close to 0.28 mm (in CSS terms). If not, the
browser
should adjust for it. It's in the specification, just look closer. An
pixel
is defined as an relative unit. It's not relative directly to an
screen pixel,
but it's relative. This feature, however, isn't implemented by most
browsers,
because they need accurate information from the OS. MS try to give
users
a choice, but Linux is ignoring the concept. Browsers can't do
anything
about it. Screen vendors comes with a recommendations which the user
on
an 17" monitor is ignoring, because he/she wants to have the maximum
out of their graphic card, and want to use the setting for an 21"
monitor.

He/she who also is a savvy Linux user can't see the small prints.
He/she is using FireFox and increase the font-size. It's all well,
except from the small pictures. (An average Linux user have perfect
vision, can See the smallest dots, but not normal fonts. They adjust
the
font-size but can't See the images. Oh, the images is in pixels, no
wonder.)
 
C

Chris F.A. Johnson

Why not? If you use CSS to set font size in terms of pixels, you
should
end up with a something close to 0.28 mm (in CSS terms). If not, the
browser
should adjust for it.

Do you know of a browser that does that?
It's in the specification, just look closer. An pixel is defined as
an relative unit. It's not relative directly to an screen pixel,

Citation?
but it's relative. This feature, however, isn't implemented by most
browsers,
because they need accurate information from the OS. MS try to give
users
a choice, but Linux is ignoring the concept. Browsers can't do
anything
about it. Screen vendors comes with a recommendations which the user
on
an 17" monitor is ignoring, because he/she wants to have the maximum
out of their graphic card, and want to use the setting for an 21"
monitor.

I want to use the best resolution my monitor supports. What's
wrong with that? On my 17" monitor 1280px wide is possible; there
is nothing that says that 1280 is only for 21" monitors.
He/she who also is a savvy Linux user can't see the small prints.
He/she is using FireFox and increase the font-size. It's all well,
except from the small pictures. (An average Linux user have perfect
vision, can See the smallest dots, but not normal fonts. They adjust
the
font-size but can't See the images. Oh, the images is in pixels, no
wonder.)

Which is why I have started specifying image widths in
percentages.
 
H

Harlan Messinger

Roy said:

Check the 15,000 discussions that have already been held on this topic.
If you use CSS to set font size in terms of pixels, you
should
end up with a something close to 0.28 mm (in CSS terms).

"Should". And it still doesn't explain why fonts shouldn't be set to
take into consideration the user's preferences.


If not, the
browser
should adjust for it. It's in the specification, just look closer. An
pixel
is defined as an relative unit. It's not relative directly to an
screen pixel,
but it's relative. This feature, however, isn't implemented by most
browsers,
because they need accurate information from the OS. MS try to give
users
a choice, but Linux is ignoring the concept. Browsers can't do
anything
about it. Screen vendors comes with a recommendations which the user
on
an 17" monitor is ignoring, because he/she wants to have the maximum
out of their graphic card, and want to use the setting for an 21"
monitor.

"Recommendation" here is obviously not that strong a term. Certainly a
variety of settings is offered because it's understood that users have
different *preferences* (not to mention *needs*). You give the
impression of having the opinion that it is the user whose
responsibility it is not to thwart the intentions of the manufacturer or
the web designer. That isn't a constructive view.
 
R

Roy A.

      Do you know of a browser that does that?
Op5Mac did, IE5/Mac gave the user a chose between 1/72 and 1/96
piksels per
inch. No one got it right. It's depends on what the OS is saying.
      Citation?

CSS2 ?
     I want to use the best resolution my monitor supports. What's
     wrong with that? On my 17" monitor 1280px wide is possible; there
     is nothing that says that 1280 is only for 21" monitors.

Oh. It's nothing wrong with that. Resolution is about quality, not
about size.
At least that you have to agree on. The problem arises when you think
about
pixels as a measure of size. Well, your OS don't give a shit (MS try
to) but
thats all. On a PDAs meant to read e-books, this will be an issue. On
an PDA you're holding your screen closer to your face, if we're
reading
a book, we also want the quality to be better. (There you go, the CSS
spesification don't say anything how an pixel relate to an dot on a
printer, you see?). I know this is controversial, but it's in the
specificatons:

"Pixel units are relative to the resolution of the viewing device,
i.e., most often a computer display. If the pixel density of the
output device is very different from that of a typical computer
display, the user agent should rescale pixel values."

http://www.w3.org/TR/REC-CSS2/syndata.html#em-width
http://www.w3.org/TR/REC-CSS2/images/pixel1.gif

As usual, user agents can do what thay want, the key word is "very
different". As I
see it, it's up to the "user agent" to decide.
     Which is why I have started specifying image widths in
     percentages.

They do it on the Web Accessibility Initiative (WAI) homepage too.
http://www.w3.org/WAI/

If the text is to small to read, the images is too.

And no, don't use pixels.
 
R

Roy A.

      Do you know of a browser that does that?
Op5Mac did, IE5/Mac gave the user a chose between 1/72 and 1/96
piksels per
inch. No one got it right. It's depends on what the OS is saying.
      Citation?

CSS2 ?
     I want to use the best resolution my monitor supports. What's
     wrong with that? On my 17" monitor 1280px wide is possible; there
     is nothing that says that 1280 is only for 21" monitors.

Oh. It's nothing wrong with that. Resolution is about quality, not
about size.
At least that you have to agree on. The problem arises when you think
about
pixels as a measure of size. Well, your OS don't give a shit (MS try
to) but
thats all. On a PDAs meant to read e-books, this will be an issue. On
an PDA you're holding your screen closer to your face, if we're
reading
a book, we also want the quality to be better. (There you go, the CSS
spesification don't say anything how an pixel relate to an dot on a
printer, you see?). I know this is controversial, but it's in the
specificatons:

"Pixel units are relative to the resolution of the viewing device,
i.e., most often a computer display. If the pixel density of the
output device is very different from that of a typical computer
display, the user agent should rescale pixel values."

http://www.w3.org/TR/REC-CSS2/syndata.html#em-width
http://www.w3.org/TR/REC-CSS2/images/pixel1.gif

As usual, user agents can do what thay want, the key word is "very
different". As I
see it, it's up to the "user agent" to decide.
     Which is why I have started specifying image widths in
     percentages.

They do it on the Web Accessibility Initiative (WAI) homepage too.
http://www.w3.org/WAI/

If the text is to small to read, the images is too.

And no, don't use pixels.
 
L

Lanmind

Thanks all,

I was out of town, I don't know why I put those style tags in there.
All better.
 
L

Lanmind

Thanks all,

I was out of town, I don't know why I put those style tags in there.
All better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top