HighDots Forums  

Pixel Specific Layout

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Pixel Specific Layout in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave (DreamIsle)
 
Posts: n/a

Default Pixel Specific Layout - 07-06-2006 , 11:11 PM






Hello. I'm working on a layout that I need to be pixel specific. How
can I get the font to stay precisely the height I need? Specifying
line-height or font-size in px doesn't yield the results I need. The
font size scales when I change the browser's font size and the text
moves from where I need it.


Reply With Quote
  #2  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-06-2006 , 11:28 PM






"Dave (DreamIsle)" <davmillar (AT) gmail (DOT) com> writes:

Quote:
font size scales when I change the browser's font size and the text
moves from where I need it.
That's how HTML and web browsers are *supposed* to work.

It's kind of like having to use NTSC-safe colors if you're broadcasting a
TV show in the US, or being limited to two channels if you're mastering
an audio CD. You have to work within the limitations of your chosen medium.

If you need perfect layout, you need to use a document format that supports
that, such as PDF.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


Reply With Quote
  #3  
Old   
Dave (DreamIsle)
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 12:58 AM



I understand that you have to work in certain limitations, but you're
full of crap if you think that that's how HTML and web browsers are
*supposed* to work. Why would one use pixels to specify a font size if
the font won't stay that size?

Sherm Pendley wrote:
Quote:
"Dave (DreamIsle)" <davmillar (AT) gmail (DOT) com> writes:

font size scales when I change the browser's font size and the text
moves from where I need it.

That's how HTML and web browsers are *supposed* to work.

It's kind of like having to use NTSC-safe colors if you're broadcasting a
TV show in the US, or being limited to two channels if you're mastering
an audio CD. You have to work within the limitations of your chosen medium.

If you need perfect layout, you need to use a document format that supports
that, such as PDF.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


Reply With Quote
  #4  
Old   
Veerle
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 01:20 AM




Dave (DreamIsle) schreef:

Quote:
Hello. I'm working on a layout that I need to be pixel specific. How
can I get the font to stay precisely the height I need? Specifying
line-height or font-size in px doesn't yield the results I need. The
font size scales when I change the browser's font size and the text
moves from where I need it.
Try flash.



Reply With Quote
  #5  
Old   
Jim Moe
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 01:39 AM



Dave (DreamIsle) wrote:
Quote:
Hello. I'm working on a layout that I need to be pixel specific. How
can I get the font to stay precisely the height I need? Specifying
line-height or font-size in px doesn't yield the results I need. The
font size scales when I change the browser's font size and the text
moves from where I need it.

Given the variation in how browsers handle font sizing, you can't get
there from here. IE handles px and pt correctly by not resizing them
(although that may be overridden). Other browsers (incorrectly) resize
everything as a favor to users because designers insist on making text too
small to read.

A workaround is to apply a style that has overflow:hidden as a rule to
the text block. At least then it may not break the pixel perfection even
though some text disappears.
Without an URL there is not much else to suggest.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


Reply With Quote
  #6  
Old   
Darin McGrew
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 02:22 AM



Dave (DreamIsle) <davmillar (AT) gmail (DOT) com> wrote:
Quote:
Why would one use pixels to specify a font size if
the font won't stay that size?
CSS is optional by design. The author's CSS can be overridden by
higher-priority user CSS, or can be ignored altogether.

And the concept of "font" and "pixel" don't even make sense in some
browsing environments.
--
Darin McGrew, mcgrew (AT) stanfordalumni (DOT) org, http://www.rahul.net/mcgrew/
Web Design Group, darin (AT) htmlhelp (DOT) com, http://www.HTMLHelp.com/

"I used to have a handle on life, but it broke."


Reply With Quote
  #7  
Old   
David Dorward
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 03:24 AM



Dave (DreamIsle) wrote:

Quote:
I understand that you have to work in certain limitations, but you're
full of crap if you think that that's how HTML and web browsers are
*supposed* to work.
Said the foul-mouthed top-poster.

CSS has user stylesheets.

http://www.w3.org/TR/CSS2/cascade.html#cascade

Browser font size zooming and minimum font-size specifications can be
thought of as writing a user stylesheet on the fly based on the author
stylesheet.

Quote:
Why would one use pixels to specify a font size if
the font won't stay that size?
Good question. Why would one? The regulars in this newsgroup generally
recommend against it.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
  #8  
Old   
Johannes Koch
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 04:00 AM



Jim Moe wrote:

Quote:
IE handles px and pt correctly by not resizing them
(although that may be overridden). Other browsers (incorrectly) resize
everything as a favor to users because designers insist on making text too
small to read.
Can you point me to the passage in the CSS specs where they say that
text zooming is forbidden for px and pt values? Text zooming is a
different thing than changing the default text size.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #9  
Old   
Johannes Koch
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 04:15 AM



Johannes Koch wrote:

Quote:
Jim Moe wrote:

IE handles px and pt correctly by not resizing them
(although that may be overridden). Other browsers (incorrectly) resize
everything as a favor to users because designers insist on making text
too
small to read.

Can you point me to the passage in the CSS specs where they say that
text zooming is forbidden for px and pt values? Text zooming is a
different thing than changing the default text size.
BTW, Firefox does not resize text with a font-size specified in px or pt
when you change the default text size, neither does Opera.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #10  
Old   
Chris Sharman
 
Posts: n/a

Default Re: Pixel Specific Layout - 07-07-2006 , 05:21 AM



Dave (DreamIsle) wrote:
Quote:
I understand that you have to work in certain limitations, but you're
full of crap if you think that that's how HTML and web browsers are
*supposed* to work. Why would one use pixels to specify a font size if
the font won't stay that size?
That's a sub-optimal manner in which to ask for help.
CSS *suggests* sizes.
Users may make overriding suggestions.
A pixel-specified font that looks good at 800*600 is going to look
pretty silly on my monster 2000*1600 display - and if I've got that
because my eyes are poor, I'm not going to be impressed by your efforts
to stop me enlarging your text so I can see it.

Pixel specification is a completely wrong-headed idea, as gets discussed
regularly here at some length. It only makes sense if you're writing for
a specific target (such as an internal page for the salesforce's pdas) -
and this group is for the www.

So - in general font sizes should be specified in ems or percentages, so
as to relate to the user's chosen text size (which presumably they
like). Occasionally you may specify size to relate to an image, for
aesthetic reasons - but the user may want (or need) to make your display
bigger or smaller, or may not have your chosen font, or whatever.
Alternatives are gif, jpg, png, flash, svg, etc (in my approximate order
of preference).

Chris


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.