473,473 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

specify page size on load

jamesd0142
469 Contributor
For reasons i wont go into (they'll bore you...) i need to have a link on our system that opens up a web page, I dont have frontpage or simular products installed, so im likely to use a text editor and rename the file '.htm'.

What i would like is to be able to create a page and specify the size when it loads.

for example can i say maybe in the head section:
page width = '100'
page height = '100'

is there anything such as this that can be done?
Apr 9 '08 #1
3 2128
drhowarddrfine
7,435 Recognized Expert Expert
This would come under presentation so use CSS. You would put this in the <head> of your page:
[html]
<head>
<style type="text/css">
body { width:100px; height:100px }
</style>
[/html]

Remember to include 'units' for the size. In this case, px.
Apr 9 '08 #2
jamesd0142
469 Contributor
So i have code like this...?

Im extremely new to html..!

Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2.   <HEAD>
  3.     <TITLE>WBL Downloads</TITLE>
  4.  
  5. <style type="text/css">
  6. body { width:100px; height:100px }
  7. </style>
  8.  
  9.  
  10.   </HEAD>
  11.   <BODY>
  12.     <H1>WBL Support Documents</H1>
  13.     <P>Downloads</P>
  14.  
  15. <hr>
  16. <b>Welsh Learning Aims Database</b> <p>
  17. (Zip file contains an access file with extension ‘.mdb’)
  18. <p>
  19. Download: <A HREF="WLAD.zip">WLAD.zip</A> 
  20. <hr>
  21.  
  22.  
  23.  
  24.   </BODY>
  25. </HTML>
Thanks James
Apr 9 '08 #3
drhowarddrfine
7,435 Recognized Expert Expert
Sort of. The body has to contain all of the elements so it will expand to do that. You can reshape it, to some extent, by controlling height and width. Play with that to see what happens.

It might be better for you to just wrap the entire contents in a <div> and shape that instead. That may be easier overall.

Also, you should get in the habit of using lower case for all your elements. HTML doesn't care but CSS does, XHTML does, as does a lot of stuff on the internet, programming stuff, and so on.

You need a doctype. Without one, IE will go into 'quirks mode' and all hell breaks loose. Make sure you use a modern, standards compliant browser to test in first. IE is NOT a modern, standards compliant browser. Use Firefox/Opera/Safari. Then check to see if IE manages to do it right.

Validate your html AND your css early and often to check for errors.

Much of that has an article under "Howtos" at the top of this page in hte html/css section.

Anyway....This should be what your markup looks like:
[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>WBL Downloads</TITLE>

<style type="text/css">

body { width:700px; height:50px }
</style>


</HEAD>
<BODY>
<div id="wrapper">
<H1>WBL Support Documents</H1>
<P>Downloads</P>

<hr>
<b>Welsh Learning Aims Database</b>
<p>
(Zip file contains an access file with extension ‘.mdb’)
</p>
<p>
Download: <A HREF="WLAD.zip">WLAD.zip</A>
</p>
<hr>

</div>


</BODY>
</HTML>
[/html]

Note that I specified which "character set" you are using. You include the utf-8 charset, which is the one you should be using, but you need to declare it, as done above.
Apr 9 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: navavil | last post by:
Hi A few days ago we released new version of our Front Page (http://www.nana.co.il/) The page gui is based on html + css and its appeard to have problem uploading the images for all the...
1
by: someone | last post by:
Please bear with me, since I'm an ASP guy, and not a .NET guy. On my site, I dynamically resize/resample images so they're not too large. GetThumbnail resulted in very poor quality, so I create a...
0
by: Lei Jiang | last post by:
I have a program that cost a lot of memory. During the load of the program, more and more memory is being allocated. I'd like to know if I specify a large initial memory size for the application,...
2
by: Philip Rayne | last post by:
I have 2 datagrids, both with databound columns that I have dynamically added. I have an EditCommandColumn on both grids. EnableViewState is enabled on both of the grids. When I click the edit...
0
by: Jeff | last post by:
Hi - I have an ASP.NET page that hangs (some times; if it loads for you, try refresh/F5 several times) when I try to run it on my localhost. It contains an HTML table for formatting, and within...
4
by: www.MessageMazes.com | last post by:
Greetings, I'm working on a collection of free puzzle pages that serve as a feed to sale pages. My question is whether I can specify that some images load before others? If you visit...
16
by: JD | last post by:
Hi guys What's the best way to specify font size using CSS? I try to avoid absolute units like pt and px because then users can't resize the fonts in IE, but % and em are a complete pain to use...
27
by: Chris Tomlinson | last post by:
Hi, is there any way to specify the sequence in which images load on a web page? More specifically, here is what we need to achieve: Image1 starts loading first and the browser does not...
2
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the...
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
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
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...

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.