SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
May 2, 2007, 04:33 #1
- Join Date
- Aug 2006
- Posts
- 266
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
if(el.style.fontSize != "36px" ) { el.style.fontSize = "36px";}
fontSize will be 36px;
I wrote this:
Code:<script type="text/javascript"> window.onload = function() { var el = document.getElementById('divid'); el.style.fontSize = "36px"; if(el.style.fontSize != "36px" ) { el.style.fontSize = "36px";} } </script> <div id="divid">font-size = 36px;</div>
If I press Ctrl ++, fontSize changes.
I don't want fontSize changes. What can I do?
I wrote this:
<div id="divid" style="font-size:36px;">font-size = 36px;</div>
If I press Ctrl -- , fontSize changes.
If I press Ctrl ++, fontSize changes.
-
May 2, 2007, 04:48 #2
- Join Date
- Jul 2006
- Location
- Thailand
- Posts
- 162
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
For accessibility, font sizes will always change when you press Ctrl++ and Ctrl+- on Firefox or Opera.
I don't think it's possible to force browser to render text at the specified size. Some alternatives are using images instead of text. You can use any CSS text replacement techniques... Note that it still won't work on Opera.
-
May 2, 2007, 05:08 #3
- Join Date
- Aug 2006
- Posts
- 266
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
the DtTvB,
Thanks...
I will use an image instead of text.
Bookmarks