Sie sind nicht angemeldet.

1

Donnerstag, 10. Mai 2012, 10:34

Scaling text

Hi all,

I am trying to make text scale appropriately to all screen sizes
Is there a way to dynamically scale the <textstyle> attribute depending on the size of the stage/screen or otherwise???

If I put tours in iframes or small divs which are smaller than the main tour. I don't want the text to always overpower the screen or flow offscreen

ALSO .... is it possible to center align the "ONHOVER" text when using a onhover="showtext(My dog [br] hates me);" call? (note the [br] tag which separates the text into 2 lines)

Thanks,

Tony

Note: This post has been modified to exclude any writing about iDevices.

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »nefar1ous« (11. Mai 2012, 06:46)


jpdeglet69

Fortgeschrittener

Beiträge: 215

Wohnort: France

Beruf: VR Maker and Document Management Expert

  • Nachricht senden

2

Donnerstag, 10. Mai 2012, 10:58

Yes,

"Dynamic" styles are the right solution to resize fontsize based on active resolution and to update css style attributes...
Resize the window on my tour or click on <> buttons...
Best regards,
JPhD
VR-Guide®/Eleana CEO
https://eleana.online

3

Donnerstag, 10. Mai 2012, 11:15

Yes,

"Dynamic" styles are the right solution to resize fontsize based on active resolution and to update css style attributes...
Resize the window on my tour or click on <> buttons...


If you have a solution, please provide some code. Thanks

BTW, cool tour... like the 3d also.

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

4

Donnerstag, 10. Mai 2012, 11:16

or the onhover="showtext(This fits the iPhone);"


Remember showtext is not working in HTML5.

Hans

5

Donnerstag, 10. Mai 2012, 11:20

Still looking for a scaling solution for divs/iframes

or the onhover="showtext(This fits the iPhone);"


Remember showtext is not working in HTML5.

Hans


Oh yeah, forgot about that. :o
There is no onhover event either, duh!

BUT I still need it for iframes and divs, so I am still looking for a scaling solution.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »nefar1ous« (10. Mai 2012, 12:57)


HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

6

Donnerstag, 10. Mai 2012, 13:33

OR/ALSO .... is it possible to center align the text when using a onhover="showtext(This fits[br]the iPhone);" call? (note the [br] tag which separates the text into 2 lines)


For that you just ad textalign="center" to the style
Just done it myself for a tour.

What I do miss is to be able to set a margin on showtext with background.

Hans

7

Donnerstag, 10. Mai 2012, 20:13

OR/ALSO .... is it possible to center align the text when using a onhover="showtext(This fits[br]the iPhone);" call? (note the [br] tag which separates the text into 2 lines)


For that you just ad textalign="center" to the style
Just done it myself for a tour.

What I do miss is to be able to set a margin on showtext with background.

Hans


I tried creating a text style that only had the attribute textalign="center", but it didn't change the onhover text, but for some reason unknown to me, it caused the text to pop up center of the screen (which is not what I wanted). Maybe I'll give it another try and see if I overlooked something... I do that often :)