+ 4

Hi all, what replaced the html's <center> tag in CSS 3?

I tried to use 'text align' but it doesn't work. Please help me on how to get the CSS 3 replacement or alternatives for the <center> tag.

14th Jul 2020, 9:48 PM
Web Shark
Web Shark - avatar
4 ответов
+ 2
what was exactly you want to center? the input and textarea field or the text inside the input and textarea field? if you want to center the field, you can do by setting the margin left and right to auto.
16th Jul 2020, 1:14 AM
sobadrdb
+ 2
Zainul Khan... I use Apache NetBeans and when I run the code - having used 'text align' -, it doesn't center everything, it does not work on input and textarea...
14th Jul 2020, 10:16 PM
Web Shark
Web Shark - avatar
+ 2
sobadrdb... I needed to center the input and textarea field... The margin-left: auto; margin-right: auto; Worked for me... Thanks.
18th Jul 2020, 9:31 AM
Web Shark
Web Shark - avatar