Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

make text smaller by default.

Posted on 2006-11-18
7
Medium Priority
?
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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:
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…

715 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