Solved

make text smaller by default.

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now