[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
how the fuk do i center text in html? <center></center>
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 17
Thread images: 5
File: Untitled-1.jpg (8 KB, 71x72) Image search: [Google]
Untitled-1.jpg
8 KB, 71x72
how the fuk do i center text in html?

<center></center> does nothing
>>
>>54426100
There's a web dev thread. Fuck off.
>>
>>54426100
works on my machine.
>>
File: IMG_20160427_230405.jpg (2 MB, 2448x3264) Image search: [Google]
IMG_20160427_230405.jpg
2 MB, 2448x3264
Center tag is deprecated you humongous first semester piece of shit
>>
>>54426150
>His html doesn't validate
Would not hire to make my MySpace page
>>
>>54426100
http://www.w3schools.com/tags/att_div_align.asp
>>
Use CSS you faggot, center tags have been deprecated for a while
>>
>>54426100
wrap it in a div or a span and give it a class in which you define CSS for that class to apply the property: text-align: center;
>>
File: Untitle456d-1.jpg (109 KB, 988x782) Image search: [Google]
Untitle456d-1.jpg
109 KB, 988x782
>>54426208

thx senpai, looks like this worked. but now it appears that the bounding box in which the text is input is not centered. what do? i have no webdev experience or credentials i'm just trying to create a good looking tumblr blog.
>>
>>54426271
add:
margin: auto;
to the container
>>
File: 1440935477965.png (74 KB, 1024x1024) Image search: [Google]
1440935477965.png
74 KB, 1024x1024
>>54426271
>i'm just trying to create a good looking tumblr blog.
>>
>>54426288
>using margin auto in 2016

Just use flexbox yo
>>
>>54426288
>>54426301
>>54426318

shit guys, i have no idea what any of this means. will just trial and error until it works lol.

>>54426288
this sounds promising, any idea how i can figure out where in the html clusterfuck i have to paste this in?
>>
it's super weird, no matter where i replace

text-align:left with 'center' it still seems like the box containing the text is squished to the left.

please guys i'm sure someone here knows the easy fix :o
>>
CSS is deprecated, use javascript instead.
>>
http://howtocenterincss.com/
>>
>>54428316
The fact that this exists makes me make to kill people.
Thread replies: 17
Thread images: 5

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.