473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

radio/Checkbox absolute positioning

I'm having trouble with this. The checkbox is no where near
where it is supposed to be and the radio button is not at 206 px away
from the left of the window.

Looks bad in IE6, even worse in Firefox1.0. I tried using <label>
tags but they didn't come out right either.

Need the class xxxx_Label because I may be having the text to the left
of the check or radiobutton.

No form tag needed here so don't mention it.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-
1">
<title>Form1</title>
<style>
body {
background:#C2BFA5;
}

.RadioButton1 {
position:absolute;
left:406px;
top:19px;
width:14px;
height:14px;
}

.RadioButton1_Label {
font-family:'MS Sans Serif';
font-size:8px;
position:absolute:
top:19px;
left: 420px;
}

.CheckBox1 {
position:absolute;
left: 112px;
top:19px;
width:14px;
height:14px;
}

.CheckBox1_Label {
font-family:'MS Sans Serif';
font-size:8px;
position:absolute:
top:19px;
left: 126px;
}

</style>
</head>
<body>
<input type="radio" name="RadioButton1" id="RadioButton1" /><span
class="RadioButton1_Label">RadioButton1</span>
<input type="checkbox" class="CheckBox1" name="CheckBox1"
id="CheckBox1" /><span class="CheckBox1_Label">CheckBox1</span>
<!-- <label class="RadioButton1_Label" for="RadioButton1">RadioButton1
</label> -->
<!-- <label class="CheckBox1_Label" for="CheckBox1">CheckBox1</label>
-->
</body>
</html>
Jul 21 '05 #1
1 6312
Mr.Clean <mrclean@p&g.com> wrote:
I'm having trouble with this.
With what? State the problem and question in the message body.

[abs positioning]
The checkbox is no where near
where it is supposed to be
Good, stop abusing absolute positioning, it's not what you think it's
for and you don't have the skills to use it properly.

Loose all the positioning and create a layout using the flow.
<?xml version="1.0" encoding="ISO-8859-1"?>
Triggers quirk mode in IE6.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


XHTML 1.1 should not be served as text/html.

--
Spartanicus
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Mullen | last post by:
I want to take the following HTLM and use javascript to turn on radio buttons if checkbox is checked, can I do this with javascript (maybe onClick or an array) or do i need a server side script ?...
1
by: Paul THompson | last post by:
I am using IE to hide sections of a form. When I display the first section (name='ea'), the form widgets are not clickable in IE nor do they accept focus. When I display the 3rd section...
10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
2
by: jimi_xyz | last post by:
Sorry if this isn't the correct group, i don't think there is a group for straight HTML. I am trying to create a type of search engine. There are two radio buttons at the top, in the middle there...
3
by: bitsyboffin | last post by:
Hi all, does anybody know of a bug in MacIE which prevents style.display = 'none' and style.visibility = 'hidden' from "sticking" in MacIE? I'm making some graphical checkboxes & radios (I know,...
2
by: NishSF | last post by:
Would anyone have any suggestions/javascript code so that if one clicks the Radio Button "Yes" below he has the option of selecting any of the six CheckBox below. If the user clicks on Radio Button...
24
by: Mike Otten | last post by:
Any help greatly appreciated. The validated page is at: http://myweb.stedwards.edu/michaelo/ddtab.htm The trouble is with the radio buttons (2/3-down the left column). The radios are...
5
by: TomB | last post by:
Please take a look at this page: http://deimos.curious.be/~dusk/contact.php?action=show_booking As you can see the radio/check buttons do not line up with their label. It works with the input...
6
by: Mark | last post by:
hi, i'm trying to position something in the top right corner of a container, but i can't seem to figure out how to get it working. here's the html <div class='thumb'><a href='image.jpg'><img...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.