Vertical Alignment in divs
-
Hi, I am struggling to have some HTML controls vertical centered in a div tag. I'm not sure what to do? I have a textbox with a button next to it. The button has some padding so it makes it "higher" than the textbox, so instead of the textbox being centered verticlly it is now at the bottom. How do I get it centered to the button? It works fine in Firefox. Brendan
-
Hi, I am struggling to have some HTML controls vertical centered in a div tag. I'm not sure what to do? I have a textbox with a button next to it. The button has some padding so it makes it "higher" than the textbox, so instead of the textbox being centered verticlly it is now at the bottom. How do I get it centered to the button? It works fine in Firefox. Brendan
Hi Brendan, give this a try style="vertical-align:middle;"
-
Hi, I am struggling to have some HTML controls vertical centered in a div tag. I'm not sure what to do? I have a textbox with a button next to it. The button has some padding so it makes it "higher" than the textbox, so instead of the textbox being centered verticlly it is now at the bottom. How do I get it centered to the button? It works fine in Firefox. Brendan
Or alternatively make you div s set width and change its margin to auto. i.e.:
This text is centred
Or try absolute positioning? Neonlight