Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Jun 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    width and height

    how do i set (in HTML) the page width and height of my website?

  • #2
    Regular Coder
    Join Date
    Sep 2004
    Location
    USA
    Posts
    314
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Use the "height=#" "width=#" in your body element (I think)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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/domr...dow_ref90.html
    http://msdn.microsoft.com/workshop/a...s/resizeto.asp

    This may not answer you question, but I'm not sure what else you would be refering to.
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #4
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why do you need to change the size of the window anyway? It just p***es me off when that happens.

  • #5
    New Coder
    Join Date
    Jun 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm still not helping! heres my problem

    go here:
    test

    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?

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Margin and/or padding

    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:
    Code:
    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.
    Last edited by ronaldb66; 10-28-2004 at 09:08 AM.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #7
    New Coder
    Join Date
    Jun 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i added this code

    PHP Code:
    <style type="text/css">
    body 
    padding0
    margin0;  

    </
    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!

  • #8
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It has to be between the <head> and </head> tags in your document.

  • #9
    New Coder
    Join Date
    Jun 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i add this code:

    PHP Code:
    <html>
    <
    head>
    <
    style type="text/css">
    body {
    margin0;
    padding0;
    }
    </
    style>
    </
    head>
    </
    html
    to my advanced page properties in geocities page builder and as an HTML code object and it's stil NOT working

  • #10
    Regular Coder
    Join Date
    May 2004
    Location
    Berkeley, California Age: 15
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pagebuilder is difficult...

    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;">

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post
    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
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #12
    New Coder
    Join Date
    Jun 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •