...

View Full Version : width and height



bratzmania001
10-26-2004, 11:37 PM
how do i set (in HTML) the page width and height of my website?

Riboflavin
10-27-2004, 12:37 AM
Use the "height=#" "width=#" in your body element (I think)

pardicity3
10-27-2004, 01:12 AM
What exactly are you refering to when you say your page's height and width? If you are refering to the actual browser window itself, you can use javascript's window.resizeTo() function though it is general frowned upon to change a user's window size.

More information on window.resizeTo():
http://www.mozilla.org/docs/dom/domref/dom_window_ref90.html
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/resizeto.asp

This may not answer you question, but I'm not sure what else you would be refering to.

chilipie
10-27-2004, 09:15 AM
Why do you need to change the size of the window anyway? It just p***es me off when that happens.

bratzmania001
10-27-2004, 07:00 PM
hmm still not helping! heres my problem

go here:
test (http://www.geocities.com/bratzmania/test.html)

see the white border around the banner! how do i get gid of that? i just want the page to be 780 width and 155 height! and on geocities pagebuilder i set the width and height to 780 width and 155 height but it's still coming up! what do i do?

how do i set the width and height to 780 width and 155 height in HTML?

ronaldb66
10-28-2004, 09:05 AM
Wrong question: the white rim around your picture is caused by the default margin and/or padding on the body element.
You can definitively erase it by setting both margin and padding of the body element to zero with a CSS rule sort of like this:

body {
margin: 0;
padding: 0;
}

Late addition:

Although there are ways to influence the window size (with scripting, not with HTML), it is considered bad practice to mess with the visitor's window.
Accept that you have no influence on the window dimensions and deal with it.

bratzmania001
10-28-2004, 04:27 PM
i added this code


<style type="text/css">
body {
padding: 0;
margin: 0;
}
</style>

to my advanced page properties in geocities page builder and it's still not working! i don't want to do! i don't know this, please don't be me! i just need this code to be able to build my site :S!

chilipie
10-28-2004, 05:17 PM
It has to be between the <head> and </head> tags in your document.

bratzmania001
10-31-2004, 06:38 PM
i add this code:


<html>
<head>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>
</head>
</html>

to my advanced page properties in geocities page builder and as an HTML code object and it's stil NOT working

Jalenack
10-31-2004, 07:11 PM
My suggestion is that you go into the html file that Page builder created for you by going to Geocities File Manager and click on edit HTML code or watever...that'll give you a window that has all the html code for that page.


Find the <body> tag and replace it with <body style="padding: 0px; margin: 0px;">

Badman3k
10-31-2004, 07:11 PM
It's not the fact that the style code isn't working it's probably to do with the Yahoo pagebuilder. It would appear that it's added it's own code to the source, and you're test page blue rectangle is positioned 8px from the top and left of the page:

<div style="position:absolute;left:8;top:8;width:778;height:145;">
<table width=778 height=145 border=0 cellpadding=0 cellspacing=0><tr valign="top">
<td bgcolor="#000066"><span style="font-size:14"> </span></td>
</tr></table></div>

If you can actually edit this code change it to start with:
<div style="position:absolute;left:0;top:0;width:778;height:145;">

and this should solve the white border problem.

Just as a side note, you may want to learn HTML rather than using WYSIWYG sitebuilders, that way you'll have more control over the source.

Hope this helps you

bratzmania001
11-01-2004, 03:09 PM
YES!! THANK YOU SO SO SO SO SO SO SO MUCH!! It worked yay!!!! I don't know what I'd did with all you're guyz help! thank you so much!

see it worked:
test (http://www.geocities.com/bratzmania/test.html)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum