Topic: Opera Text Sizes (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10757" title="Pages that link to Topic: Opera Text Sizes (Page 1 of 1)" rel="nofollow" >Topic: Opera Text Sizes <span class="small">(Page 1 of 1)</span>\

 
Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-15-2002 04:31

This is more of a browser question, and considering that this used to be 'All Browsers Suck,' I thought it would be appropriate here.

Both IE and NS allow you to change the text size of a web page. In Opera, though, the only thing I could find was "zoom" (in the "view" menu), which shrinks not only the text but the graphics as well, making them look like crap. Is there a way to change just the text size in Opera?

I ask this not because I use Opera, but because the site I'm currently working on has relative text sizes. I did this purposely to allow the user to select the text size most comfortable for him or her. If Opera doesn't allow you to change only the text size, though, doesn't that kind of defeat the purpose?




Cell 270

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-15-2002 11:14

AFAIK Opera can only zoom the whole page, you can't increase/decrease just text size...


Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-16-2002 10:38

Thanks, mr.maX. I must say that blows. What the heck were they thinking? Oh well, screw Opera.

Who was the Opera fanatic around here? Was it Emperor? I wouldn't mind hearing from him on this as to why Opera doesn't have the function...

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

posted posted 06-17-2002 10:29

if you don?t mind me saying; it's probably not too wise to just say "screw opera" since it's the default browser for the symbian platform which will be absolutely massive in a couple of years when we all get better mobile phones

on an accessibility note, it's good practice to use relative font sizes so the user can adjust the text size should they have reading difficulties be they dyslexic or partially sighted - in this respect the opera browser is by far and away the best since you can zoom up to a ridiculously large text size, whereas ie and ns could be said to blow goats for the partially sighted community by not providing this functionality

just as a suggestion: a possible workaround for you might be to provide the user with a larger / smaller font control on the web page; clicking for a different font size would set a cookie / session variable incremented upwards or downwards by 0.5em or whatever increment you fancy - this value can be used to dynamically write the users preferred value of font size into a style declaration either onload or during some back end processing
- this way everyone's happy not having to zoom or change their font size...

hth
I:.

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-17-2002 12:49

You're right, of course. Hasty words spoken in a fit of frustration...

The font incrementing is a good idea, and I think I've seen it used elsewhere. You wouldn't happen to know off the top of your head a site that does that, would you?

Thanks for the advice (one of those "why didn't I think of that?" moments ).

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 06-17-2002 13:02

The only page I can think of at the momemt that does something like that is Emps page, but I cannot find a link to it right now.



_________________________
Anyone who has lost track of time when using a computer knows the propensity to dream, the urge to make dreams come true and the tendency to miss lunch.
- copied from the wall of cell 408 -

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

posted posted 06-17-2002 14:35

I havent tested it thoroughly on all browsers, but here's some code that should do the job for you:


code:
<html>
<body>

<script language="javascript">
var jsCrLf = String.fromCharCode(10,13);
var lngCookieValue = 1.0;


document.cookie = "";

var intBegin = document.cookie.indexOf("=") + 1;
if (intBegin != 0)
{
lngCookieValue = document.cookie.substring(intBegin, document.cookie.length);
}

document.write("<style>" + jsCrLf + "div {" + jsCrLf + "font-family: arial; font-size: " + lngCookieValue + "em; color: blue;" + jsCrLf + "}" + jsCrLf + "</style>");


function fBiggerSmaller(fltIncrement)
{
document.cookie = "fontSizeCookie = " + escape(parseFloat(lngCookieValue) + fltIncrement)
document.location.reload();
}

</script>


<div>
more fun than an open casket funeral
</div>


<div>
<a href="javascript: fBiggerSmaller(0.5)">+</a>
<a href="javascript: fBiggerSmaller(-0.5)">-</a>
</div>

</body>
</html>




hth
I:.

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-17-2002 15:30

Thanks! I'll have to try that out. You've been a great help!

[Edit: the code works in IE 6 and NS 6, but unfortunately it doesn't work in Opera 6. I'd still like to use it, though...

I'm definitely not the expert in this area... anyone have any ideas on how to fix it?]

[Edit: hmm... probably a better question for the Javascript forum...]

[This message has been edited by Suho1004 (edited 06-17-2002).]

[This message has been edited by Suho1004 (edited 06-17-2002).]

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

posted posted 06-18-2002 08:06

just checked it on opera 6, and the code works fine although you might want to use px increments since operas implementaition of em's is a little non-linear

did you test the code on a webserver via http:// rather than from a file:// location?
- one of operas "features" is that it doesn't get and set cookies from a file:// location
this should do the trick for you

I'll post this reply on the other thread that's running in the dhtml forum on this topic as well

have a nice day
I:.



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


« BackwardsOnwards »

Show Forum Drop Down Menu