[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 576
  • Last Modified:

ASP.net screen suddenly stretched


I opened my ASP.net project to find that the controls have stretched. In the image controls that were next to each other are very far apart.

Here's some of the markup

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Admin.aspx.vb" Inherits="Survey.Admin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
            width: 138px;
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <asp:Label ID="Label39" runat="server" Width="297px"></asp:Label>
        <asp:Label ID="Label_LoggedIn" runat="server" ForeColor="#666666"
            Text="Not logged in" Font-Size="X-Small" Width="80px"></asp:Label>
        <asp:Label ID="Label_Reviewer" runat="server" ForeColor="#666666"
            Font-Size="X-Small" Width="80px"></asp:Label>
        <asp:Label ID="Label40" runat="server" ForeColor="#CCCCCC"
        <asp:Label ID="Label_Survey" runat="server" Width="474px" ForeColor="#CCCCCC"></asp:Label>
        <asp:Label ID="lblAdminID" runat="server" ForeColor="#003366" Text="Admin ID"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="Label30" runat="server" ForeColor="#003366" Text="Password"></asp:Label>
Murray Brown
Murray Brown
1 Solution
Is this markup you have created? Or this is autogenerated?

Why so many &nbsp;?
Roopesh ReddyCommented:

Issue with your HTML markup code!

You try to use CSS to design the page!

Moreover, never use &nbsp; for spacing!

Instead, try this code!

<span style="width:100px;display:inline-block;" ></span>

Open in new window

Hope it helps u...
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now