Topic: CSS textsize (liquid format) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10997" title="Pages that link to Topic: CSS textsize (liquid format) (Page 1 of 1)" rel="nofollow" >Topic: CSS textsize (liquid format) <span class="small">(Page 1 of 1)</span>\

 
dvvelzen
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jun 2003

posted posted 06-26-2003 23:53

Hi,

i am developing a site for a friend that uses a lot of absolute and percentages.... This way the site will adjust to every windowsize...

BUT; i can't seem to do the same with the text. As an IMG i say it is 90% absolete and it will autoadjust. a textsize of 90% will take a 90% size of the normal size and not adjust that when the window size changes. Can someone tell me how to program this?

thnx,
Dennis

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 06-27-2003 00:16

It is my pleasure to reply for your first thread as first person from this forum.
Nice to see you, dvvelzen! How are you going?
Well, sorry to disappoint you but this thread is the one which I have been wondering like you for ages.
I guess we cannot do this.
Does anybody know if it is possible or not?
If so, plesae let us know.
Cya.

Hiroki Kozai

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-27-2003 03:20

To my knowledge, no - it's not possible with HTML.

Something like Flash can do that though....

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-27-2003 03:46

DL is right, there is no way to do this in HTML.

The reason it doesn't work is that 90% is 90% of the default font size, which has nothing to do with the window size. I don't think what you want to is possible because I don't think you can peg the text size to the window size...

[Edit: Ah, yes, I was trying to be helpful... One thing you could do would be to detect the window size with JavaScript and then switch to a style sheet with the appropriate font for that size--for example, 10pt for anything below a certain point, 11pt for the next range, etc. I wouldn't really recommend this method, but it's the only way I can think of to do what you're trying to do.]

[Edit2: OK, I'll get my act together eventually. What I would actually recommend is just set the text using percentages and then let the user decide if it's too big or too small--give them control over the font size.]

[This message has been edited by Suho1004 (edited 06-27-2003).]

[This message has been edited by Suho1004 (edited 06-27-2003).]

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 07-01-2003 16:22

isn't there a font size that is directly proportional to the size of the text element? 'em' is it?

check here: http://www.w3schools.com/css/css_units.asp


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 07-01-2003 23:52

yes, but that is not relative to the window size...wouldn't make any difference in this case...

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 07-02-2003 07:39

Maybe I'm missing the point, but it seems to me you should be able to pick a window size to design the page to, for example 600x800. Then when the user loads the page, query the window size and calculate a ratio of the actual window size to your standard window size. Then use JavaScript to set the text size based on that ratio.

-- not necessarily stoned... just beautiful.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 07-02-2003 10:18

Look no further than this...
our very own Doc's former frontpage... http://www.ozones.com/ourWalls/

This resizes text based on windowsize (and d*mn how I love this version...)
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

ozphactor
Maniac (V) Inmate

From: California
Insane since: Jul 2003

posted posted 07-04-2003 00:03

This may also be useful: http://hotwired.lycos.com/webmonkey/reference/javascript_code_library/wm_scl_fnt/?tw=reference&category=layout_css



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu