Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

make text smaller by default.

Posted on 2006-11-18
7
Medium Priority
?
176 Views
Last Modified: 2010-04-06
is there a way to make text smaller in a webpage which  appearing in a iframe in my webpage. in safari u can make a website's text smaller by clicking view>make text smaller.(similar in other browers). but how to do that by default in a iframe webpage?
0
Comment
Question by:arasuworld
  • 3
7 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 17971152
<style>
* { font-size:smaller }
</style>
0
 

Author Comment

by:arasuworld
ID: 17971430
the script is making all the text in my page smaller. it also resizes the search field smaller.now i can't make a search in the search field. how do i make the  text smaller only the webpages in iframe.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 17978747
<html>
  <head>
  <title></title>
<script>
x="<body>this text is small</body>"  
</script>
<style>
.smallest { font-size:smallest }
</style>
  </head>
  <body onLoad="top.iframe1.document.body.style.fontSize='6pt'">
Normal text
<iframe id="iframe1" src="javascript:top.x"></iframe>
  </body>
</html>
0
 
LVL 4

Accepted Solution

by:
madutis earned 1000 total points
ID: 18129843
You don't need to do it JavaScript. CSS is loaded automatically when page loads. So the code should look like this:

<html>
  <head>
  <title></title>
<style>
#smaller { font-size: smaller }
</style>
  </head>
  <body>
Normal text
<iframe id="smaller" src="youriframesource"></iframe>
  </body>
</html>
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 1000 total points
ID: 18131002
Looks to me like they are the same size


<html>
  <head>
  <title></title>
<style>
#smaller { font-size: x-small }
</style>
<script>
var text ="<h3>Hello</h3> World"
</script>
  </head>
  <body>
<h3>Hello</h3> World<br>
<iframe id="smaller" src="javascript:top.text"></iframe>
  </body>
</html>

 
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question