Aligning checkbox text with checkbox with CSS - html

I have a fieldset in which I have some input fields and a checkbox. I have the problem that I would like to have a legend directly beside the checkbox. I made it visible on this link:
http://jsfiddle.net/uUtmU/
I worked around and tried using padding-bottom and margin-bottom, without any success.
If there is someone who could help me out, I really would appreciate. Thanks a lot.

Hey now give to input vertical-align: top; as like this
#split input[type="checkbox"] {
vertical-align: top;
width: 10px;
}

you could just absolute the positioning on the terms text and set a margin-top to push it down a little, I found by adding
.tandc {
position:absolute;
margin-top:2px;
}
Hope it helps

Related

How to make sharing icon in one row?

I am really bad with css and html, can somebody help with this simply problem?
On the bottom of the [site][1] i have text and sharing icons. How can i make them in one row? Like on right from text. It looks horrible now.
Thank you!
here:
this css should work:
.text-muted {
display: inline-block;
}
div.ya-share2 {
display: inline-block;
float: right;
margin-top: 20px;
}
explain: it makes both elements able to coexist in the same line, plus the margin-top is just for aligning it.
add that to your CSS file and youre good to go

Form fields not aligning correctly

If you see the image above, you will see that the input field and button are not aligning correctly. I don't know what I am doing wrong.
You can view the page at http://djkavish.com/test3/
Any help is deeply appreciated.
#bottomform input {
display: inline-block;
vertical-align: middle;
}

Style text inside a 'textarea'

I'm working in this form. Its design is exactly like this:
Right now I'm at this stage, so I am working on some little details:
As you will be able to see, the "Your text..." is stuck to the top left corner of the textarea. I'm trying to find a way to manipulate this via CSS if possible. I just need to apply some margin/padding to the text inside the textarea. If this is not possible with CSS I'm open for suggestions.
How can I manipulate the text inside the textarea via CSS?
You can use CSS padding property:
textarea {
padding: 5px;
}
Use:
textarea {
padding: 5px;
box-sizing: border-box;
}
Note: box-sizing is a CSSĀ 3 property. It's very useful, because without it width: 100% or other will not work as you expected.
You can use CSS to create the desired effect
textarea {
padding: 20px;
margin: 10px;
}
<textarea></textarea>
Yes, the padding from CSS applied to textarea is correct. But then you need to change the "rows" and the "columns" as the dimensions of the whole textarea changes.
You can use the code below:
line-height: _px;
Use the same value as the height of the textarea.

HTML, CSS issue: HTML fieldset placing/positioning

I have a HTML page with personal information details using text boxes. I have two fieldsets as in
this Jsfiddle.
As noticed that the fieldsets are placed up and down position. My question is that
How can I placed these two fieldsets side by side (left & right position)?
Thank you
I removed the form width: 40%; and assigned a float:left; property on those fieldsets. Here is the corrected fiddle: Try me
Remove width:40% from form & give float to your fieldsets.
Check this: http://jsfiddle.net/XdRYT/8/
Simplest solution is create table with two cells and one row and place each fieldset in different cell. Another bit more complicated is to use CSS to format it.
Change fieldset stye to below
fieldset {
border: 1px dotted #61B5CF;
margin-top: 1.4em;
padding: 0.6em;
float:left;
width:40%;
}

Positioning text inputs?

I haven't used forms alot so Im not sure whats going on here.
Im trying to position a text input inline with a button but it doesnt seem to work. You can see what Im doing here:
http://jsfiddle.net/gagalug/BEBAH/
Thanks.
Add this line to your style:
img, input[type=image] {vertical-align: bottom;}
This will prevent baseline issues on images and image-inputs. Solves your problem instantly.
You know, more people really should know about this. Even the guy who writes a site as big as QuirksMode is ignorant of this fact.
Add
input { vertical-align: middle; }
There are various ways.
Positioning relative to the parent div and position absolute to the child.
vertical-align: middle; for both input
Hey i think you want this
option you just define your vertical-align:top;
#text{
height: 40px;
vertical-align: top;
}
live demo http://jsfiddle.net/BEBAH/4/
Modify your CSS as below.
div{
border: 1px solid black;
width: 500px;
height: 50px;
float:left;
}
#text{
height: 40px;
top: 0px;
float:left;
}