Help > Layout & Coding Help > Post Reply     

Centering Layout

Player Avatar
Bandit | Back Again!
July 18th, 2016 5:07:10pm
50 Posts

I recently decided to learn how to code and with the help of W3schools and some things I've found in this part of the forums I've /almost/ succesfully created an accordian style layout on this account http://horsephenomena.com/home.php?id=42525. But its aligning to the left of the page, and despite adding a center tag it won't move. I don't know if I just put it in the wrong spot or if I'm just not using it right... can anyone help me out? I'm sure the layout is full of errors so if you see anything else I'd really appreciate it if you pointed it out! Also ignore the awful color scheme, I was experimenting lol.




 


View Comments 1


Default Avatar
VictorySoup (Main)
July 18th, 2016 7:19:01pm
50 Posts

First things first. Go back through your code and make sure you have all of your "px", ";", and colors labeled correctly. I see you are missing a few and one color has too many "#". All css code needs to end with ";". Also, on your header footer property, it looks like you accidentally isoloated a ";". Move that ";" back up to be next to "color: #ffcccc" and it should fix a lot.

I'm learning too, but I think that you need to remove the center tag and use a margin property in the style part of your image tag. If that makes any sense? So it should say something like "img src="http://i67.tinypic.com/307uvxf.jpg" style="width:800px; height:533px; margin: 100px;". You just adjust the margin px as needed. Though, as I'm messing with your code on my page, adding the margin property moves the div down. I don't know why as I've never done that type of layout. However, I think you may be able to add a position and top property to fix it. I'm sure someone more experienced could probably give you a better answer, but maybe try what I suggest and then fiddle around with it to see if it works?




 

Player Avatar
Bandit | Back Again!
July 18th, 2016 7:32:30pm
50 Posts

Β I'll try doing those things, thank you!




 

View Comments 1