A Little HTML Coding Problems ...

TappedOut forum

Posted on July 12, 2014, 5:14 a.m. by Femme_Fatale

If you look to my profile, you will notice a lovely card of me done by buffy, in which I tweaked card-text wise. Now my main problem is ... how do I get that image to stay centered? It goes centered for about a second on page load, and then sticks to the left again.

< div style="text-align:center;" >< img src="http://gyazo.com/18e4d961fdcf0510650a6f5176ce0f9c.png" alt="Femme_Fatale, Modern Master" / > < /div >

No it does not work with < p style=" .... < /p >. I've already tried that and there wasn't even that initial center upon page load.

smackjack says... #2

try < img src="http://gyazo.com/18e4d961fdcf0510650a6f5176ce0f9c.png" alt="Femme_Fatale, Modern Master" style="width: 340px; left: 50%; margin-left: -170px;" / >

July 12, 2014 5:17 a.m.

Femme_Fatale says... #3

Does not work, it goes to left even more than normal! Also, I do not want the "width: 340px;" portion of that as it makes my image blurry. I tried it with and without and nothing changes besides the quality is better without it.

I also tried it with right instead of left, as obviously it needs to move right. In this case it goes back to its original position and never moves right any more regardless of what positive or negative values I put for the margin.

July 12, 2014 5:24 a.m.

smackjack says... #4

< img src="http://gyazo.com/18e4d961fdcf0510650a6f5176ce0f9c.png" alt="Femme_Fatale, Modern Master" style="position: relative; display: block; width: 340px; left: 50%; margin-left: -170px;" / >

July 12, 2014 6:19 a.m.

Matsi883 says... #5

< img style="margin: auto" >

July 12, 2014 7:37 a.m.

GREPTAR says... #6

This is probably really obvious and I'd say you've already tried but I must ask. Did you try the< center > < /center > tag?

July 12, 2014 8:02 a.m.

Matsi883 says... #7

The center tag is dropped in HTML 5.

July 12, 2014 8:05 a.m.

GREPTAR says... #8

It still works on here though

July 12, 2014 8:07 a.m.

Matsi883 says... #9

You should try not to use it, though. It only works because your browser has to support old versions of HTML.

July 12, 2014 8:18 a.m.

yeaGO says... #10

mostly just you not knowing how to center things :P

fixed it

July 12, 2014 1:33 p.m.

Femme_Fatale says... #11

Thanks yeaGO.

And yeah, I have practically no experience in html coding. So that is why I ask~

July 12, 2014 2:39 p.m.

This discussion has been closed