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
Solved

make text smaller by default.

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Standards for file storage. 3 31
Getting Started on web Development for an experienced C++ developer 7 124
replace quotes with UTF-8 character 38 104
React or Angular? 6 80
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…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

789 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