Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #33513 > unrolled thread
| Started by | bit-naughty@hotmail.com |
|---|---|
| First post | 2017-06-09 08:44 -0700 |
| Last post | 2017-06-09 16:33 -0400 |
| Articles | 7 — 4 participants |
Back to article view | Back to comp.lang.javascript
Different size text depending on size of screen bit-naughty@hotmail.com - 2017-06-09 08:44 -0700
Re: Different size text depending on size of screen "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-06-09 14:12 -0400
Re: Different size text depending on size of screen "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-06-09 14:23 -0400
Re: Different size text depending on size of screen Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2017-06-12 12:57 +0300
Re: Different size text depending on size of screen "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-06-12 09:47 -0400
Re: Different size text depending on size of screen Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-06-09 19:34 +0100
Re: Different size text depending on size of screen "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-06-09 16:33 -0400
| From | bit-naughty@hotmail.com |
|---|---|
| Date | 2017-06-09 08:44 -0700 |
| Subject | Different size text depending on size of screen |
| Message-ID | <d3edf185-9f23-4d89-828b-ad990c276427@googlegroups.com> |
Hi, not sure if this group or the CSS group is the right one, but: If the browser window is Bigger, I'd like the same text my website has, displayed - Bigger! ie. proportional to the size of the screen, just like a PDF file. How do I pull this off? Thanks.
[toc] | [next] | [standalone]
| From | "Dave \"Crash\" Dummy" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-09 14:12 -0400 |
| Message-ID | <oheo73$jt2$1@dont-email.me> |
| In reply to | #33513 |
bit-naughty@hotmail.com wrote: > Hi, not sure if this group or the CSS group is the right one, but: If > the browser window is Bigger, I'd like the same text my website has, > displayed - Bigger! ie. proportional to the size of the screen, just > like a PDF file. How do I pull this off? <script type="text/javascript"> fs=0.05; 'desired proportional font size document.body.style.fontSize=fs*screen.height; </script> -- Crash Life is short. Eat dessert first.
[toc] | [prev] | [next] | [standalone]
| From | "Dave \"Crash\" Dummy" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-09 14:23 -0400 |
| Message-ID | <oheoss$mbt$1@dont-email.me> |
| In reply to | #33516 |
Dave "Crash" Dummy wrote: > bit-naughty@hotmail.com wrote: >> Hi, not sure if this group or the CSS group is the right one, but: >> If the browser window is Bigger, I'd like the same text my website >> has, displayed - Bigger! ie. proportional to the size of the >> screen, just like a PDF file. How do I pull this off? > > <script type="text/javascript"> fs=0.05; 'desired proportional font > size document.body.style.fontSize=fs*screen.height; </script> Oops! I'm used to working in VBScript. The comment string should be set off with double slash, not single quote: <script type="text/javascript"> fs=0.05; //desired proportional font size document.body.style.fontSize=fs*screen.height; </script> -- Crash All this time I thought my analyst was saying I'm psychic...
[toc] | [prev] | [next] | [standalone]
| From | Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> |
|---|---|
| Date | 2017-06-12 12:57 +0300 |
| Message-ID | <m3lgox8r6a.fsf@sonera.fi> |
| In reply to | #33517 |
"Dave \"Crash\" Dummy" <invalid@invalid.invalid> writes: > Dave "Crash" Dummy wrote: >> bit-naughty@hotmail.com wrote: >>> Hi, not sure if this group or the CSS group is the right one, but: >>> If the browser window is Bigger, I'd like the same text my website >>> has, displayed - Bigger! ie. proportional to the size of the > <script type="text/javascript"> > fs=0.05; //desired proportional font size > document.body.style.fontSize=fs*screen.height; > </script> Not good. The *screen* size is irrelevant, use the window size instead. -- Jukka Lahtinen
[toc] | [prev] | [next] | [standalone]
| From | "Dave \"Crash\" Dummy" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-12 09:47 -0400 |
| Message-ID | <ohm5pp$ji5$1@dont-email.me> |
| In reply to | #33522 |
Jukka Lahtinen wrote: > "Dave \"Crash\" Dummy" <invalid@invalid.invalid> writes: >> Dave "Crash" Dummy wrote: >>> bit-naughty@hotmail.com wrote: >>>> Hi, not sure if this group or the CSS group is the right one, but: >>>> If the browser window is Bigger, I'd like the same text my website >>>> has, displayed - Bigger! ie. proportional to the size of the > >> <script type="text/javascript"> >> fs=0.05; //desired proportional font size >> document.body.style.fontSize=fs*screen.height; >> </script> > > Not good. The *screen* size is irrelevant, use the window size instead. Perhaps, but the OP specifically asked for "proportional to the size of the screen." -- Crash I'm not archaic, I'm retro!
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-06-09 19:34 +0100 |
| Message-ID | <878tl1au35.fsf@bsb.me.uk> |
| In reply to | #33513 |
bit-naughty@hotmail.com writes: > Hi, not sure if this group or the CSS group is the right one, but: If > the browser window is Bigger, I'd like the same text my website has, > displayed - Bigger! ie. proportional to the size of the screen, just > like a PDF file. How do I pull this off? If you can rely on CSS3 it's a CSS issue. Look at the size units that are relative to the size of the initial containing block -- vh, vw, vmin and vmax. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | "Dave \"Crash\" Dummy" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-09 16:33 -0400 |
| Message-ID | <ohf0fa$ho2$1@dont-email.me> |
| In reply to | #33518 |
Ben Bacarisse wrote: > bit-naughty@hotmail.com writes: > >> Hi, not sure if this group or the CSS group is the right one, but: >> If the browser window is Bigger, I'd like the same text my website >> has, displayed - Bigger! ie. proportional to the size of the >> screen, just like a PDF file. How do I pull this off? > > If you can rely on CSS3 it's a CSS issue. Look at the size units > that are relative to the size of the initial containing block -- vh, > vw, vmin and vmax. Excellent! Much better solution for a web page, where scripting might be blocked. The only drawback is possible incompatibility with older browsers. Minor note. The CSS3 solution doesn't seem to work with Windows 10 HTA pages. -- Crash "The real question is not whether machines think but whether men do." ~ B. F. Skinner ~
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web