3 replies [Last post]
Scrypt
Scrypt's picture
Offline
newbie
Last seen: 10 years 3 weeks ago
Timezone: GMT-4
Joined: 2013-05-04
Posts: 3
Points: 4

I'm new to coding; I started the html for my site 5 days ago, started php/mysql 3 days ago, got php/mysql up 2 days ago, and got the login-form functioning yesterday. Today, I am trying to recenter the site around the login-form to no avail.

I've looked around for hours, but the only thing I could find was "{float". I've tried a few things but nothing has worked; I'm not even sure I understand CSS syntax.

I also cant figure out how to post the code in plaintext so I've included an image.

thumb_example.jpg

Thanks in advance Smile

Scrypt
Scrypt's picture
Offline
newbie
Last seen: 10 years 3 weeks ago
Timezone: GMT-4
Joined: 2013-05-04
Posts: 3
Points: 4

I think

I found "position:fixed" is a better option, but I really must not understand CSS syntax.

I'll keep trying

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 13 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Let's break bad habits before they become habitual

Since you're just starting, first rule: Never use tables for layout. They're strictly containers for positionally related (tabular) data. See the tutorials at HTMLDog for examples of best practice.

Do something like this:

<!DOCTYPE html>
<html>
  <head>
    <meta content="text/html; charset=utf-8"
          http-equiv="Content-Type" />
 
    <title>test doc</title>
 
    <!-- hack for bug in Web Developer addon for Firefox.  Used for
	 development and debugging only-->
    <link rel="stylesheet"
	  type="text/css" href="x" />
 
    <base href="" />
 
    <style type="text/css">
      /*<![CDATA[*/
 
form {
  border: 1px solid black;
  float: right;
  margin: 0;
  width: 250px;
  }
 
fieldset {
  border: none;
  }
 
h1 {
  border: 1px solid black;
  margin: 0 auto;
  width: 33%;
  }
 
      /*]]>*/      
    </style>
  </head>
 
  <body>
    <form>
      <fieldset>⋯</fieldset>
    </form>
 
    <h1>⋯</h1>
  </body>
</html>

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Scrypt
Scrypt's picture
Offline
newbie
Last seen: 10 years 3 weeks ago
Timezone: GMT-4
Joined: 2013-05-04
Posts: 3
Points: 4

THANKS!!

Wow, do I have alot of editing to do Wink