473,414 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 2815
Zeez wrote on 13 jan 2006 in comp.lang.javascript:
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.javascript:
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.com, 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.109.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.javascript:

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.style) document.writeln(J, "<br>")
document.body.style.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.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jan 14 '06 #5
On 2006-01-14, Dr John Stockton <jr*@merlyn.demon.co.uk> wrote:

for (J in document.body.style) document.writeln(J, "<br>")
document.body.style.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.style){
document.writeln(J,"->",document.body.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.javascript:
for (J in document.body.style){
document.writeln(J,"->",document.body.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:500px;' 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:DXImageTransform.Microsoft.Matrix";
flt+= "(M11=2,M12=0,DX=0,M21=0,M22=1,DY=0,FilterType=bil inear)";

function demo() {
document.body.style.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.javascript:
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.com/groups?hl=en&lr=&safe=off&num=10&q=matrix+filter+g roup%3Acomp.lang.javascript&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**********************@f14g2000cwb.googlegroups .com>

Jan 15 '06 #10
JRS: In article <2c*****************@clunker.homenet>, dated Sun, 15
Jan 2006 06:46:18 local, seen in news:comp.lang.javascript, Jasen Betts
<ja***@free.net.nz> posted :
On 2006-01-14, Dr John Stockton <jr*@merlyn.demon.co.uk> wrote:

for (J in document.body.style) document.writeln(J, "<br>")
document.body.style.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.style){
document.writeln(J,"->",document.body.style[J],<br>);
}

same as any other for-in loop


Thanks. I *thought* I'd tried document.body.style[J] ; perhaps I failed
to observe the few non-blank values pos... and textDec... and zIndex.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jan 16 '06 #11

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

Similar topics

8
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
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
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...
82
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...
3
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...
1
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...
1
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...
1
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...
2
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.