/    Sign up×
Community /Pin to ProfileBookmark

Best way to offer different text size to visitor

Hi!

I want to put a button on my site to offer to my visitor 2 different text size!

What’s the best way to do that? Have 2 .css?

t

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@fredmvFeb 18.2004 — In Mozilla, it's as easy as this:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>untitled</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" />
<style type="text/css" title="Default fonts">
/*<![CDATA[*/
html, body {
font-size: 100%;
}
/*]]>*/
</style>
<style type="text/css" title="Larger fonts">
/*<![CDATA[*/
html, body {
font-size: 150%;
}
/*]]>*/
</style>
</head>
<body>
<body>
<p>foo</p>
</body>
</body>
</html>
However, in IE it's likely you'll have to use some extra scripting to get it working correctly; check [url=http://www.alistapart.com/articles/alternate/]this article[/url].
Copy linkTweet thisAlerts:
@VladdyFeb 18.2004 — Look at customization wiget on my site.
×

Success!

Help @turb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...