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

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

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'."
0
RobAinscough
Asked:
RobAinscough
1 Solution
 
b1xml2Commented:
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...
0
 
RobAinscoughAuthor Commented:
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?
0
 
HavaganCommented:
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.

Paul
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
RobAinscoughAuthor Commented:
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.?
0
 
b1xml2Commented:
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

e.g.
<style>
td
{
  font-family: Verdana, Arial, Tahoma;
  font-size: 10px;
}

</style>

a good starting point to learn CSS is : http://www.w3schools.com/css/default.asp

0
 
ovalsquareCommented:
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)

body
{
    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 http://www.w3schools.com/css/default.asp as b1xml2 suggested.

Ted
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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