CSS form checkbox alignment!

This is a discussion on "CSS form checkbox alignment!" within the Web Page Design section. This forum, and the thread "CSS form checkbox alignment! are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Nov 29th, 2007, 13:51
Up'n'Coming Member
Join Date: Apr 2007
Location: Canada
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
CSS form checkbox alignment!

Hi folks,

I have created a form in my website for registering people. It works fine but the checkbox i have used to agree terms and condition is aligned differently in netscape and firfox than IE. In IE it looks fine but if I tab down the form field to the checkbox it show a field to the left of the checkbox. It only happens in IE.
And in Netscape and firfox it align to the left too much. Any idea ?
Here is the link of my form
http://www.bangladeshilivingabroad.com/111/signup.html

Html for the checkbox is
PHP: Select all

<label for="agree"></label>
<
input type="checkbox" name="agree" id="agree" value="yes" /> By clicking this I agree&nbspthe <a href="http://www.bangladeshilivingabroad.com/disclaimer.htm">disclaimer</a
and CSS I have used
PHP: Select all

form {
margin-left:20px;
}
label
{
width10em;
floatleft;
text-alignright;
margin-right0.5em;
displayblock;
}
input
{
color#781351;
background#fee3ad;
border 1px solid #339900;
}
fieldset
{
border1px solid #781351;
width33em;
padding6px 0 0 0;
}
legend
{
color#fff;
background#ffa20c;
border1px solid #781351;
padding2px 6px 

Thanks in advance for your response.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 29th, 2007, 15:12
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS form checkbox alignment!

try adding this to your CSS

HTML: Select all
ol{
position:relative;
top:0;
margin:0 0 0 10em;
padding:0;
}
then add this to html

HTML: Select all
<ol><label for="agree"></label>
<input type="checkbox" name="agree" id="agree" value="yes" />
 By clicking this I agree&nbsp; the <a href="http://www.bangladeshilivingabroad.com/disclaimer.htm">
disclaimer</a></ol> 
may need a bit of tweaking but should work.

10.2em is probably better

Last edited by dab42pat; Nov 29th, 2007 at 15:20.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 29th, 2007, 16:48
Up'n'Coming Member
Join Date: Apr 2007
Location: Canada
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS form checkbox alignment!

Hi, yes it works ok with Netscape and Firfox but not in IE. It is way to the right in Ie and outside of fieldset . I used 2.1em to that in the middle in Netscape and Firfox. Cau u pls tell me what ol and li means in CSS if you know. I search could find much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 29th, 2007, 17:10
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS form checkbox alignment!

If you cant find a solution to this then:

A: It doesnt look bad the way it is in ie and ff
B: try a conditional comment for ie

heres a link

http://www.webforumz.com/html-forum/...i-write-ie.htm.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 29th, 2007, 18:00
Up'n'Coming Member
Join Date: Apr 2007
Location: Canada
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS form checkbox alignment!

Thanks dab, I will probably endup using the conditional comment if can fix it but did you see my current form in IE, If you tab through the form after current profession it should go to the checkbox rather it goes to the left in invisible label, do you know anything about it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] help with checkbox and textfield in form BRONIC JavaScript Forum 8 Apr 22nd, 2008 16:08
[SOLVED] Form Checkbox Validation Stuart PHP Forum 26 Nov 24th, 2007 23:39
[SOLVED] Form to email with checkbox itsdesign PHP Forum 4 Oct 29th, 2007 00:57
<form> tag in <table> is causing alignment issues - HELP! Love2Java Web Page Design 5 Sep 4th, 2007 15:27
Desparately Need Form, Checkbox Component Help grillbat Starting Out 1 Aug 21st, 2007 16:04


All times are GMT. The time now is 01:46.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42