Having the darndest time trying to center an image in CSS

Link to my codepen: http://codepen.io/NerdBurglur/pen/Vmrmqj

So i searched around for neat effects for my first tribute page. I found out how to make an image rotate and change to another image. I cant figure out how to center that class… at all…

I am looking for an answer on how to center the .rotate class

Or if i need to switch stuff around.

Thanks!

OK i got it to where im happy with its look on full page… its still sort of skewed to the right when the page isnt maximized though…

I tried removing the width and replaced it with margin: auto;, think that’s what you’re lookin for?

The width was set at width:1256px; which is causing issues , try using 600px maybe

1 Like

indeed! I was getting sort of turned around and trying things in different places. It looks much better the way you suggested! Thanks!

1 Like

fyi i was just fudging with different things trying to make the image center…and i noticed it would scoot over the more i increased the width… thats how i got to 1256px lol… it just looked center… but i knew it wasnt the correct way. Thank you for your response Conor-Dunne

No worries man , i’m a beginner myself so i’m well aware of the pain of trying to make things work haha

i think the forums and community are SO cool… How people go out of there way to help one another. I cant wait to be able to help someone else.

There are some brilliant ppl here @NerdBurglur , you’ll get to know them soon!

1 Like