Search code examples
c#cssasp.nethtmlresolution

screen resolution and scrolling bar


Currently I am practicing create a web site by using visual studio.

Q1) I have a text on top of my screen in master page, when I use width:100%, btn down there will appear a scrolling bar for me to scroll left and right (The thing is on my right of my page is nothing). May I know how to remove it?

Q2) May i know how to set the web page is fix to the resolution to 1027 x 768 automatically?

Demo Fiddle

Thanks for the help! Your comment and suggestion are appreciated.


Solution

  • Question 1: Use the following CSS and see updated Fiddle.

    HTML:

    <div id="user2"> <a id="User"><asp:Label ID="Label1"  runat="server" Text="User" Font-Size="XX-Large" Font-Bold="true"></asp:Label></a>
    </div>
    

    CSS:

     #User {
            Height:47px;
            float:left;
            text-align:left;
            padding-top:6px;
            font-family:Calibri;
            font-size:25px;
            background-color:grey;
            width:100%;
        }
    

    Question 2: Set width of div to 1024px;