Positioning Web Control using css in VS 2008




I am building an ASP.net website. To position web controls side by side
regardless of their dimension I am trying to use css absolute positioning but
Web Control which contains a button control doesn't go where I put it.
Instead it goes in the upper right corner of the web page. Looking a the
code below can I put the Web Control containg the button
somewhere besides the upper right hand corner of the page, I am using an
external css style sheet in the ASP application using VS 2008?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<%@ Register src="CallInformation.ascx" tagname="CallInformation"
tagprefix="uc1" %>
<%@ Register src="PollSiteInformation.ascx" tagname="PollSiteInformation"
tagprefix="uc2" %>
<%@ Register src="PollSiteContact.ascx" tagname="PollSiteContact"
tagprefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" type="text/css" href="callcenter.css">
<head runat="server">
<title>Call Incident</title>

<form id="form1" runat="server">
<div id="callinfo">
<uc1:CallInformation ID="CallInformation1" runat="server" />

<div id="pollsiteinfo">
<uc2:pollSiteInformation ID="PollSiteInformation1" runat="server" />
<div id="pollsiteer">
<uc3:pollSiteContact ID="PollSiteContact1" runat="server" />

<br />


Below is the css file, it is only eight lines pollsiteer is a button I want
to move from the upper right corner of the web page to the position 300
pixels from the left and 300 pixels down;

bruce barker

css requires units: top:300; is ignored. try top:300px;left:300px; of
course if the first div is wider than 300px, they will overlap. you
probably should use floats or set the size of the divs.

-- bruce (sqlwork.com)

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question