#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0

    How to set width and heigth 100% without scroll bar in website?


    Hai everyone
    How to set full page .i.e width and height 100% without appear scroll bar. Don't consider address bar only.my need is website appear in full page in all browser including ie8 and also in all screen resoultions,pls give some sample code ,like full page background color ok,no need to put controls,just full page background enough but scroll bar not appear without consider address bar only,if search bar,tool bar is there scroll bar can appear.

    This is my code,but color not appear in full page,if i set height as pixel can appear but small white space is appear bottom of page when i test in different browsers.

    May be use java script to calculate width and height of inner browser and set to a page using java script at run time.
    Code:
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%;">
    <head runat="server">
        <title></title>
    </head>
    <body style ="margin :0px; height :100%" >
        <form id="form1" runat="server" >
        <div style="height: 100%;">
        
        <table width="100%"  border="0" cellpadding="0" cellspacing="0"  style ="background-color :red">
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
            </table>
        
        </div>
        </form>
    </body>
    </html>



    pls reply asap
    Thanx
    Aravind
  2. #2
  3. ~ bald headed old fart ~
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Location
    chertsey, a small town s.w. of london, england
    Posts
    250
    Rep Power
    86
    Hi there aravindb,

    and a warm welcome to these forums.

    Here is a basic example...
    Code:
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
    
    <meta charset="utf-8">
    
    <title>untitled document</title>
    
    <style>
    html,body {
        height:100%;
        margin:0;
        background-color:rgb(0,0,0);
     }
    #container {
        width:75%;
        height:100%;
        margin:auto;
        background-color:rgb(255,0,0);
     }
    </style>
    
    </head>
    <body>
    
    <div id="container"></div>
    
    </body>
    </html>
    coothead
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0

    How to use this code in master page ?


    Hai
    Thanx for ur reply and it work in ordianry page,but i use master page and i want full page in child page aslo,how to apply ur code in master page ?

    Originally Posted by coothead
    Code:
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
    
    <meta charset="utf-8">
    
    <title>untitled document</title>
    
    <style>
    html,body {
        height:100%;
        margin:0;
        background-color:rgb(0,0,0);
     }
    #container {
        width:75%;
        height:100%;
        margin:auto;
        background-color:rgb(255,0,0);
     }
    </style>
    
    </head>
    <body>
    
    <div id="container"></div>
    
    </body>
    </html>
    coothead
  6. #4
  7. ~ bald headed old fart ~
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Location
    chertsey, a small town s.w. of london, england
    Posts
    250
    Rep Power
    86
    Hi there aravindb,
    ...but I use master page...
    What is master page

    coothead
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0

    Just choose master page in visual studio


    Hi
    just choose master page in vs,then u know,in master page contenplacehoder there ,but in ur code no contentplaceholder is available,ur code is ordinary web form
  10. #6
  11. ~ bald headed old fart ~
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Location
    chertsey, a small town s.w. of london, england
    Posts
    250
    Rep Power
    86
    Hi there aravindb,
    ...just choose master page in vs,then u know,in master page contenplacehoder there ,
    but in ur code no contentplaceholder is available,ur code is ordinary web form..
    Sorry squire, but I am afraid that I am totally unable to decipher your spiel.
    I can do some basic coding, but cryptology is way out of my league.

    coothead
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0

    can u send contact address ?


    Originally Posted by coothead
    Hi there aravindb,

    Sorry squire, but I am afraid that I am totally unable to decipher your spiel.
    I can do some basic coding, but cryptology is way out of my league.

    coothead
    hi can u send contact address ,my address is(aravindforums1(at)gmail.com) pls send request to me
  14. #8
  15. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,128
    Rep Power
    4304
    Welcome to DevShed Forums, aravindb.

    Many developers don't have experience with .Net. I recommend you go ask in the .Net Forum how to use a master page like that.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo