GridLayout (CSS) vs. FlowLayout and Web Forms (Design mode).

Posted on 2005-05-06
Last Modified: 2013-12-03
I'm developing a web application and would like to know which is the better approach to designing my web forms?

I've read that CSS is not supported by Netscape 4 or IE4, but if that is the only issue, then I'm probably not concerned about using CSS.

I've also noticed that in Design mode for a Web Form, if I go to the HTML code, it shows errors whenever I use a "panel" on the form -- and the results on my web form seem inconsistant (panel sometimes centers and sometimes doesn't).  The specific errors I see when switching to HTML are:

"Within a server element, the element 'asp:panel' is missing its closing tag or overlaps with element 'p'."
Question by:RobAinscough
    LVL 23

    Expert Comment

    CSS is supported in IE4. In fact, it is because of better CSS support in IE4 that Nutscrape lost the browser wars. Grid Layout uses absolute positioning (which would work with IE 4 but definitely not with Nutscrape 4.x)

    If cross browser functionality is needed, use the FlowLayout, and use tables with CSS but not absolute positioning...

    Author Comment

    I can make the assumption that IE6 or higher is required.  Is CSS specific to any single web page -- sorry, I'm don't know much about CSS, nor HTML for that matter.  In VS.NET how do I even associate a CSS with a web page?
    LVL 6

    Expert Comment

    To link an ASPX page to a CSS file you have two options:

    Manually enter the LINK tag in the HEAD of your document in HTML view.
    <link href="../path/tostylesheet.css" rel="stylesheet" type="text/css">

    Or from VS.NET, select the FORMAT > DOCUMENT STYLE menu which brings up the style popup window. This will allow you to link to an external stylesheet which will then place the above LINK code in your ASPX file.


    Author Comment

    Are there any Font restrictions when creating a web form?  Meaning do I need to worry about what font the client/broswer supports?  

    For example I like to use Sylfaen and Trebuchet MS for my primary fonts -- will these get auto translated by the browser if they don't exists on the client end?

    Should I apply the same rule as developing Windows Forms apps in terms of font selection -- i.e. stick to the basic Arial, Times Roman, etc.?
    LVL 23

    Expert Comment

    if you are using MSIE 6, well you can use CSS. It is in fact better than using HTML attributes. Generally, with server controls, attributes are converted to css values.

    <asp:TextBox Id="txtUser" Runat="Server" Width="100px" />

    emitted as
    <input type="text" id="txtUser" name="txtUser" style="width:100px" />

    generally we provide a list of fonts to be used, in order of priority from left to right

      font-family: Verdana, Arial, Tahoma;
      font-size: 10px;


    a good starting point to learn CSS is :

    LVL 5

    Accepted Solution

    Regarding your font question, it depends on the end client so typically it's safe to go with Trebuchet MS, but not Sylfaen. Usually in css you'll define what fonts to use in a specific order in case a specified font is not available. If it's requirement that you have a specific font, you'll have to use gifs (although with css you can include font definitions, just not the best way to go).

    i.e. (note that Trebuchet MS is in quotes because it is two words)

        font-family: "Trebuchet MS", Verdana, Arial, sans-serif;
        font-size: 12px;

    This way, all text in your body (unless over-ridden by other properties like h1, p, and the like) will be Trebuchet MS, if on the end-users computer, or Verdana, then Arial, etc. Past that, head to as b1xml2 suggested.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now