473,804 Members | 3,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GroupBox looking CSS

I am trying to mimic a Windows GroupBox control using fieldset, label
and radio buttons. The problem lies in that I can not correctly do the
radio buttons relative to the groupbox and the label doesn't get placed
in the right place. The word Female should be to the right of the radio
button. Should I use a label for the radio button's caption here
instead?

Can anyone help out?

http://www.austinmetrobaseball.com/groupbox.html

or here is the code if you don't want to navigate:

<?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=is o-8859-1" />
<title>Form1</title>
<style type="text/css">
body {
background:#C2B FA5;
}
.GroupBox1 {
font-family:'MS Sans Serif';
font-size:8px;
position:absolu te;
left:25px;
top:184px;
width:149px;
height:105px;
}
.FFemaleRadioBu tton {
position:relati ve;
left: 22px;
top: 32px;
}
</style>
</head>
<body>
<fieldset class="GroupBox 1">
<legend>GroupBo x1</legend>
<input type="radio" name="Sex"
value="female"
class="FFemaleR adioButton" />Female
</fieldset>
</body>
</html>
Jul 21 '05 #1
3 16881
On Tue, 2 Nov 2004 12:50:25 -0600, Mr.Clean <mrclean@p&g.co m> wrote:
I am trying to mimic a Windows GroupBox control using fieldset, label
and radio buttons. The problem lies in that I can not correctly do the
radio buttons relative to the groupbox and the label doesn't get placed
in the right place. The word Female should be to the right of the radio
button. Should I use a label for the radio button's caption here
instead?

Can anyone help out?

http://www.austinmetrobaseball.com/groupbox.html


1) You should use label, but for other reasons.

2) You're positioning the button and not the label anyhow. See difference
below. You'll want to rename your class, as it will apply to many other
buttons. I've used it here just because it's pre-existing.

<form>
<fieldset class="GroupBox 1">
<legend>GroupBo x1</legend>
<div class="FFemaleR adioButton">
<input type="radio" id="sexm" name="Sex" value="male" />
<label for="sexm">Male </label>
</div>
<div class="FFemaleR adioButton">
<input type="radio" id="sexf" name="Sex" value="female" />
<label for="sexf">Fema le</label>
</div>
</fieldset>
</form>
Jul 21 '05 #2
In article <op************ **@news.individ ual.net>, ne*****@yahoo.c om
says...
On Tue, 2 Nov 2004 12:50:25 -0600, Mr.Clean <mrclean@p&g.co m> wrote:
I am trying to mimic a Windows GroupBox control using fieldset, label
and radio buttons. The problem lies in that I can not correctly do the
radio buttons relative to the groupbox and the label doesn't get placed
in the right place. The word Female should be to the right of the radio
button. Should I use a label for the radio button's caption here
instead?

Can anyone help out?

http://www.austinmetrobaseball.com/groupbox.html

1) You should use label, but for other reasons.

Yes, I already use it for other things.
2) You're positioning the button and not the label anyhow. See difference
below. You'll want to rename your class, as it will apply to many other
buttons. I've used it here just because it's pre-existing.

<form>
<fieldset class="GroupBox 1">
<legend>GroupBo x1</legend>
<div class="FFemaleR adioButton">
<input type="radio" id="sexm" name="Sex" value="male" />
<label for="sexm">Male </label>
</div>
<div class="FFemaleR adioButton">
<input type="radio" id="sexf" name="Sex" value="female" />
<label for="sexf">Fema le</label>
</div>
</fieldset>
</form>


Well the above isn't really what I want but it has led me to a solution.

This is a groupbox with separate radiobuttons, it can contain checkboxes
or other controls such as an edit, as well. I also have a radiogroubox,
it has only radio buttons and they have an itemindex.

I'm not making this into an inout form although the only way to get
the radios and checks is to use input tags.

I am translating a Delphi Form into an HTML page. I am going to leave it
up to the HTML designer to modify for input.
Jul 21 '05 #3
<SNIP>
1) You should use label, but for other reasons.

2) You're positioning the button and not the label anyhow. See difference
below. You'll want to rename your class, as it will apply to many other
buttons. I've used it here just because it's pre-existing.

<SNIP>
what determines the positioning of the label if you don't use
CSS positioning?
Jul 21 '05 #4

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

Similar topics

0
2330
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new System.Windows.Forms.GroupBox(); etc. for all other Controls. After setting Font and Text values I then add them to the Panel: pnPanelControls.Controls.Add(groupBoxProdukt_01); pnPanelControls.Controls.Add(groupBoxProdukt_02);...
0
1620
by: Renee | last post by:
Hi there, does any one know how to create context sensitive help for Groupbox control with HelpProvider class? I can create context sensitive help for any control easily except for Groupbox. Here is how you can reproduce it: 1. Create a form, in its properties, set the MinimizeBox and MaximizeBox to
1
13066
by: MikeY | last post by:
I'm trying to find a way for changing the thickness of the groupbox borders. I've searched on this site but can't seem to find anything of this subject. Does anyone have a suggestion. Thanks in advance MikeY
4
11593
by: Peteroid | last post by:
In a standard GroupBox, how do I make the visible 'border line' not show (it looks like an etched in line about 5 pixels shy of each border of the group box)? Thanks in advance!
4
1546
by: TJS | last post by:
I get this error at time of compiling my class code what's missing ?? =================== error ============================= Me.groupBox1 = New GroupBox ~~~~~~~~~~~~~ C:\Documents and Settings\...\Builder.vb(89) : error BC30002: Type 'GroupBox' is not defined. ====================================================
8
2932
by: johnmmcparland | last post by:
Hi all, my program is trying to add group boxes with radio buttons at run time. While at one point it was able to draw the group boxes without the radio buttons, now it encounters problems just getting the radiobuttons out of the group box. /// area where radio buttons added to groupbox /// this code is wrapped in another loop creating group boxes
2
6616
by: Rich | last post by:
Hello, Is it possible to assign a value to a groupbox by selecting a radiobutton contained in the groupbox? Say you assign a value of 1 to radbtn1, 2 for radbtn2, 3 for radbtn3 all contained in grpBox. You click radbtn1. Console.writeline(grpBox.Value.ToString)
8
28563
by: Steve | last post by:
Hi All Is there a way to change the colour of a Groupbox border in VB.net 2005 I want to change it to white Can it be done in the onpaint event? Regards Steve
3
2482
by: Enkidu | last post by:
I'm trying to add TextBoxes in a square 'array' into a GroupBox. It looks like I have to, for each TextBox, get the size of the GroupBox, calculate position of each TextBox, set the Location of the TextBox to a new Location object with the calculated coordinates and the TextBox should then be located in the correct position. I'd much rather say, for example, left gap equals x%, top gap = y%, draw the TextBox, dimensions a% by b%, move...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10326
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9143
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.