/    Sign up×
Community /Pin to ProfileBookmark

Newbie Question, one DIV for all?

i am using this:

div.indentPositive
{
text-indent: 25px;
}

to indent the choices a user has when answering a question. but why won’t this work:

[code]
<div class=”indentPositive”><input type=”radio” name=”cust1″ value=”Well Above”> Well Above
<input type=”radio” name=”cust1″ value=”Above”> Above
<input type=”radio” name=”cust1″ value=”Meets”> Meets
<input type=”radio” name=”cust1″ value=”Below”> Below
<input type=”radio” name=”cust1″ value=”Well Below”> Well Below</div>
<br>
[/code]

I have to have a div with that class for each radiobutton. otherwise the radio buttons and text all appear on one line.

thanks!

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJun 16.2005 — How about changing "text-indent" to "padding-left"? ("Text-indent" only affects the first line of a block of text.)
Copy linkTweet thisAlerts:
@BonRougeJun 16.2005 — Try this : &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd "&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Radio buttons&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
&lt;style type="text/css"&gt;
#myform label{
display:block;
text-align:right;
width:7em;
}
#myform input {
margin:0 3px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="myform"&gt;
&lt;label&gt;Well Above&lt;input type="radio" name="cust1" value="Well Above" /&gt;&lt;/label&gt;
&lt;label&gt;Above&lt;input type="radio" name="cust1" value="Above" /&gt;&lt;/label&gt;
&lt;label&gt;Meets&lt;input type="radio" name="cust1" value="Meets" /&gt;&lt;/label&gt;
&lt;label&gt;Below&lt;input type="radio" name="cust1" value="Below" /&gt;&lt;/label&gt;
&lt;label&gt;Well Below&lt;input type="radio" name="cust1" value="Well Below" /&gt;&lt;/label&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@sanjuTauthorJun 16.2005 — Try this : &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd "&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Radio buttons&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
&lt;style type="text/css"&gt;
#myform label{
display:block;
text-align:right;
width:7em;
}
#myform input {
margin:0 3px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="myform"&gt;
&lt;label&gt;Well Above&lt;input type="radio" name="cust1" value="Well Above" /&gt;&lt;/label&gt;
&lt;label&gt;Above&lt;input type="radio" name="cust1" value="Above" /&gt;&lt;/label&gt;
&lt;label&gt;Meets&lt;input type="radio" name="cust1" value="Meets" /&gt;&lt;/label&gt;
&lt;label&gt;Below&lt;input type="radio" name="cust1" value="Below" /&gt;&lt;/label&gt;
&lt;label&gt;Well Below&lt;input type="radio" name="cust1" value="Well Below" /&gt;&lt;/label&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
[/QUOTE]



doesn't this basically accomplish what i originally was doing? i wanted one tag to cause all the radio buttons to indent. basically nesting the input tags within the 'indent' tag.

i don't even know if this is possible, but i don't see why not.
×

Success!

Help @sanjuT spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...