Solved

make text smaller by default.

Posted on 2006-11-18
7
170 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 250 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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.
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

713 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