Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<form id="form1" runat="server"> Screwing up CSS. Any

Status
Not open for further replies.

rushnp774

Programmer
Feb 28, 2009
4
First off, I'm a beginner when it comes to ASP.NET, but I have some experience with C++, VB6, and PHP,

so programming is not a new thing to me. I've started a website in Web Developer Express, and added the

contents of a CSS template I found on the internet, specifically "Stylevantage" from
to my project folder:

Template demo:
Template download site:

After copying the HTML code from its index.html into my default.aspx file, it runs fine, but only when I

have the <form id="form1" runat="server"> tag after the header <div>. If I insert the line any time

before the </div> for the header division, the whole page renders about 15px from the top, and the #head

<div> is all goofy.

I really need to have the <form> tag before the <head> tag so I can use some code to swap out meta

information as well as some content in the header (banners mainly).

Here is the content from the default.aspx file just to the end of the #header division:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"
<html xmlns="<head runat="server">
[more meta stuff here]
<link rel="stylesheet" href="images/Blue.css" type="text/css" />
<title>Testing</title>
</head>

<body>

<div id="wrap">
<div id="header">
<h1 id="logo">Test <span class="blue">Site</span></h1>
<h2 id="slogan">put your site slogan here...</h2>
</div> <!-- End header -->

<form id="form1" runat="server">


If anyone has ANY ideas why the page slides down if I insert the form tag before the end of that <div>,

I'd be VERY grateful. I've been playing with it for two days now and it's driving me crazy. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top