473,785 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a way to stretch an HTML body?

Hello!

I'm looking for a way to stretch an HTML page.

I found a way to zoom into a web page by using this code:
body.style.zoom = 200%. (this piece of code magnifies the page 2 times
larger)

By following this way, the whole HTML page will be zoomed BUT in a
PROPORTIONAL way.

What actually i'm looking for is stretching the page. What i mean by
stretching is: stretching the width of the page by a factor X and the
height of the page by a factor Y and not doing it proportionally as
what will be done by using the ZOOM.

I know the web page will look distorted but i can get with that!

Thanks in advance!

Jan 13 '06 #1
10 2853
Zeez wrote on 13 jan 2006 in comp.lang.javas cript:
Hello!

I'm looking for a way to stretch an HTML page.

I found a way to zoom into a web page by using this code:
body.style.zoom = 200%. (this piece of code magnifies the page 2 times
larger)
IE only!!!
By following this way, the whole HTML page will be zoomed BUT in a
PROPORTIONAL way.
No, not with javascript.
What actually i'm looking for is stretching the page. What i mean by
stretching is: stretching the width of the page by a factor X and the
height of the page by a factor Y and not doing it proportionally as
what will be done by using the ZOOM.

I know the web page will look distorted but i can get with that!


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 13 '06 #2
Thanks for the quick reply.

Ok, so do u know if this is possible in any other way? If yes, any
examples or links?

Thank You

Jan 13 '06 #3
Zeez wrote on 13 jan 2006 in comp.lang.javas cript:
Thanks for the quick reply.

Ok, so do u know if this is possible in any other way? If yes, any
examples or links?


This is usenet, not email.

If you don't quote relevent part of what you are replying on,
we won't know what you are talking about.

If you want to post a followup via groups.google.c om, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 13 '06 #4
JRS: In article <Xn************ ********@194.10 9.133.242>, dated Fri, 13
Jan 2006 08:33:42 local, seen in news:comp.lang. javascript, Evertjan.
<ex************ **@interxnl.net > posted :
Zeez wrote on 13 jan 2006 in comp.lang.javas cript:

I found a way to zoom into a web page by using this code:
body.style.zoom = 200%. (this piece of code magnifies the page 2 times
larger)


IE only!!!


Perhaps "some IE only!!!" ??

The following, executed in js-index.htm or otherwise, may be useful for
those with good eyesight & monitors ...

for (J in document.body.s tyle) document.writel n(J, "<br>")
document.body.s tyle.fontSize = 11

It tells how to do things, for the current browser, with some clue as to
what they may be.

I don't recall how one can read the current settings of those (such as
cursor ).

There's nothing for asymmetrical zoom, AFAICS; that's a pity, because
programmed linear transformations (such as can be done in Windows Paint
and IIRC PostScript) could be very useful.

I once had an application which could squash fonts horizontally; Courier
squashed 60% can be very readable for the area it takes up.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jan 14 '06 #5
On 2006-01-14, Dr John Stockton <jr*@merlyn.dem on.co.uk> wrote:

for (J in document.body.s tyle) document.writel n(J, "<br>")
document.body.s tyle.fontSize = 11

It tells how to do things, for the current browser, with some clue as to
what they may be.

I don't recall how one can read the current settings of those (such as
cursor ).


for (J in document.body.s tyle){
document.writel n(J,"->",document.bod y.style[J],<br>);
}

same as any other for-in loop

Bye.
Jasen
Jan 15 '06 #6
Jasen Betts wrote on 15 jan 2006 in comp.lang.javas cript:
for (J in document.body.s tyle){
document.writel n(J,"->",document.bod y.style[J],<br>);
}


As the style only is available in the DOM when the pagebuild is finished,
how would a document.write not destroy those styles?
Only the first one is shown.

try:

========= test.html =========
<body style='height:5 00px;' onload='x()'>

<script type="text/JavaScript">
var b = document.body
function x(){
for (J in b.style)
b.innerHTML += J + " -> " + b.style[J] + "<br>"
}
</script>
=============== ==============

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 15 '06 #7
VK
OP can use (IE-only, IE 5.5 or higher) very powerful Matrix filter:
<http://msdn.microsoft. com/workshop/author/filter/reference/filters/matrix.asp>

A sample follows below (watch line breaks). Also remember that IE is
still a desktop application, not a DirectX game builder. Therefore all
these filters are rather resource expensive, say a JScript-based Quake
Arena won't fly (yet?) ;-)

For similar effect in Gecko and Opera the only option (yet?) is to
design the whole page in SVG and apply SVG transformations on it.

<html>
<head>
<title>Matrix filter</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script type="text/Jscript">
var flt = "progid:DXImage Transform.Micro soft.Matrix";
flt+= "(M11=2,M12=0,D X=0,M21=0,M22=1 ,DY=0,FilterTyp e=bilinear)";

function demo() {
document.body.s tyle.filter = flt;
}

window.onload = demo;
</script>
<style type="text/css">
body {
font: 1.2em "Times New Roman", Times, serif;
background-color: #FFFFFF;
margin: 0px 0px;
padding: 10px 10px;
width: 100%;
}
</style>
</head>

<body>

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,

sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>

</body>
</html>

Jan 15 '06 #8
VK wrote on 15 jan 2006 in comp.lang.javas cript:
OP can use (IE-only, IE 5.5 or higher) very powerful Matrix filter:
....


Are you anwering on something?

Please quote relevant part.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 15 '06 #9
VK

Evertjan. wrote:
Are you anwering on something?

Please quote relevant part.


Please do *not* quote while explaining newsgroup quote rules.
;-)

Google Search still gives the right thread:
<http://groups.google.c om/groups?hl=en&lr =&safe=off&num= 10&q=matrix+fil ter+group%3Acom p.lang.javascri pt&safe=off&qt_ s=Search>
but an "info noise" has been added bor "matrix filter" keywords.

And sorry, yes, it was my answer to Message-ID:
<11************ **********@f14g 2000cwb.googleg roups.com>

Jan 15 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
30992
by: John Smith | last post by:
In Mozilla/Netscape, is it possible to make a DIV stretch the length of a page ithout resorting to the "repeat background image" trick? Thank you!
8
6212
by: bradwiseathome | last post by:
I have a DIV specified like this: #divStretchArea { padding: 0px ; margin : 0px ; border: 1px #0C96C3 solid ; position : absolute ; overflow-x : auto ; overflow-y : none ;
1
1885
by: Tyrant Mikey | last post by:
I ahve a page that contains a DataGrid control that is offset from the left-hand side of the page by about 100 pixels. What I want to do is stretch the DataGrid to fill the remainder of the page width as the user resizes the window. I have tried the following, to no avail: <SCRIPT language="javascript"> void ResizeGrid() { document.all.grdManifests.style.width = document.body.clientWidth -
82
6356
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility of getting wrong it seems I am on very shaky ground . For example, pretty much every book and web course on html that I have read tells me I must include <html>, <head> and <body> tag pairs. I have always done that, and never questioned it. ...
3
19243
by: susibabe | last post by:
I have a website that I am working on the layout.... www.sngao.com/Joomla I tried to use a table with four rows, * 1st row - banner * 2nd row - also banner image * 3nd row - has three cells, one left frame image that stretched to full length of the table, one content cell, and one on the right side has a nested table with 5 navigation buttons and some images for spacing and **i made a background image for the listing titles...
1
2295
by: dutchguy | last post by:
Hi there. I've searched the forum but could find what I was looking for. I have a tree column site. The 3 columns are in an outer div. I would like that the outer div (and the other 2 divs) to stretch with the content of the highest div. I saw some examples to get a 100% height by adding 100% to the body,html but that isn't what i want. I just want the div's in the outer div to stretch with the (variable)height of the highest div. Can...
1
3122
by: mactelesis | last post by:
I have searched for "vertical stretch, align, etc." and have tried (and failed) with all of the solutions to stretch the "#nav vertical" div so that it streches to the height of the page. As you can see I simply set it to "height:800px;" - which looks bad on really short pages (http://www.coloradopedia.com/~newports/HoursOfOperation.html ) or really long ones (http://www.coloradopedia.com/~newports/BoardOfDirectors.html Please help - on...
1
3417
by: crazy works | last post by:
hello i was working on design new style for games script called onarcade and i want to stretch it , i mean i want to make the script width full screen in the script one css file and i had a try with it but i failed so u can download the script from here http://www.zshare.net/download/14849983ecd99b03/
2
3216
by: donpro | last post by:
Hi, If you look at my test page on: http://www.program-it.ca/test.html and look at the source, you'll see both the HTML and CSS code. My question is as follows: If I either increase the text size or shrink the window, the inner DIVS start to wrap below each other. What I really want is the outer DIV to stretch horizontally and the inner DIVS to remain next to each other on the same row.
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.