Join 117,572 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,828 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
hey im having a little trouble with aligning codes on my game, they dont seem to go where i cant them to. i have a login box that i want centred, ive tried <centre> code </centre> yet it still remains on the left hand side. where am i going wrong lol by the way im doing this in php
hey as you know from my email ages ago im kinda new to this, im learning as i go lol with the great help from you guys on dic. the temp link is http://195.12.48.96/~dhrpgcou/ im tryin to get the login into the centre of the page and the footer at the bottom lol
The first thing you need to do DestroyeR is make sure the page is in the proper format. That is that it has a <html>,<head>,<title> tags and closing tags. Go to any HTML tutorial on the web to figure out how this is done.
Second, the www was heavily influenced by us crazy americans back in the day so the spelling of centre is actually "center".
You also didn't finish your table. Make sure your PHP is spitting out correct HTML format. I see no </tr> or </table> closing tags at the end.
Next you can put your login form inside something like a <div> tag which then through CSS you can align to center. Look up <div> tags on the net if you are unfamiliar with how they work.
So fix these things up and if you are still having problems, republish your site with the updates and let us know on this thread again.
And thanks for putting your replies in this thread instead of PM.
Here is a taste of what your page could look like with some of these changes made (oh and btw <center> tags work but they are a bit discouraged to use these days).
CODE
<html> <head> <title>My Page</title> <style>
body { background-image:url("http://images.layouts.fm/0/24/24362.gif"); background-repeat:no-repeat; background-position:center; background-attachment:fixed;}
table, tr, td, input, div { background-color:transparent; border:0px;} a img {border:0px;}
I finished your table, removed your center tags, put your form in a div tag and centered it and everything. This was a quick few changes I made and of course you can work it from there into what you want to do.