i have a div.I want the input box to place at its center .how can i do this??
+1
A:
#the_div input {
margin: 0 auto;
}
I'm not sure if this works in good ol' IE6, so you might have to do this instead.
/* IE 6 (probably) */
#the_div {
text-align: center;
}
August Lilleaas
2009-08-15 07:46:27
thanks for helping me .
2009-08-16 06:25:55
A:
#input_box {
margin: 0 auto;
text-align: left;
}
#div {
text-align: center;
}
<div id="div">
<label for="input_box">Input: </label><input type="text" id="input_box" name="input_box" />
</div>
or you could do it using padding, but this is not that great of an idea.
Tom
2009-08-15 15:04:58
A:
Try this website it shows you how to centre things in a div and or text. Dorward
Cool Hand Luke UK
2009-08-15 15:52:29