Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


how to place check boxes

Posted on 2011-10-02
Medium Priority
Last Modified: 2012-05-12
on the form http://www.nethealthinteractive.com/pqrs/ParticipantDetails.aspx

we have two check boxes that should align left in the right hand column.  I can get one to align but not both.  How can I do this?  Note that this is a asp.net page, so the checkbox code is generated by .net

Preferred Email Address *
(Please indicate which email address you'd         __  Participant Email Address
prefer us to use for contacting your office.)        __Administrator Email Address
Question by:d2fox
LVL 16

Accepted Solution

SSupreme earned 2000 total points
ID: 36899773
The first solution which comes on the mind is to apply clear:left; to element, but unfortunately there is no border where it should stop. I modified html and added some style to it which can be replaced to style-sheet later if needed, so instead of <span> you need to have <div> like this one:
<div style="position: relative;width:500px;float:right;">
<input type="checkbox" id="ctl00_ContentPlaceHolder1_ContactParticipantByEmail" name="ctl00$ContentPlaceHolder1$ContactParticipantByEmail">
<label for="ctl00_ContentPlaceHolder1_ContactParticipantByEmail">Participant Email Address</label>
<input type="checkbox" id="ctl00_ContentPlaceHolder1_ContactAdministrationByEmail" name="ctl00$ContentPlaceHolder1$ContactAdministrationByEmail" style="clear:left;">
<label for="ctl00_ContentPlaceHolder1_ContactAdministrationByEmail">Administrator Email Address</label>

Open in new window

replace it and have a look at it.
LVL 15

Expert Comment

ID: 36901544
in Firefox it's looks good

not relevant to the answer but when I go directly to the page I get error:

Server Error in '/pqrs' Application.

Object reference not set to an instance of an object. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

Line 18:         if (!IsPostBack)
Line 19:         {
Line 20:             HFURL.Value = Request.UrlReferrer.ToString();
Line 21: 
Line 22:             if (

Source File: c:\inetpub\nethealth\PQRS\ParticipantDetails.aspx.cs    Line: 20 

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   ParticipantDetails.Page_Load(Object sender, EventArgs e) in c:\inetpub\nethealth\PQRS\ParticipantDetails.aspx.cs:20
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.4211; ASP.NET Version:2.0.50727.4209 

Open in new window


Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

564 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