Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with positioning

    i have this code
    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>Lucky lottery</title>
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
    <section>
        <h1>Lucky Lottery</h1>
        <form id="signup">
            <input type="submit" value="Sign up">
        </form>
    </section>
    <section>
        <table>
            <thead>
            
            </thead>
            <tbody>
            <tr>
                <td><img src="http://i.imgur.com/CPL4LDK.png" alt="melk karton"/></td>
                <td><img src="http://i.imgur.com/mdC666s.png" alt="ariel zeep doosje"/></td>
                <td><img src="http://i.imgur.com/Kvw9Nc7.png" alt="fiets"/></td>
                <td><img src="http://i.imgur.com/bm7vW1i.png" alt="man op strand"/></td>
            </tr>
            <tr>
                <td><img src="http://i.imgur.com/qhDC741.png" alt="starwars"/></td>
                <td><img src="http://i.imgur.com/Wrhna5e.png" alt="tandenborstel"/> </td>
                <td><img src="http://i.imgur.com/GoWB6jj.png" alt="ponies"/></td>
                <td><img src="http://i.imgur.com/BvNQjPC.png" alt="wii-u"/> </td>
            </tr>
            </tbody>
        </table>
    </section>
    <section id="under">
        <form name="input" action="html_form_action.asp" method="get">
            <input type="text" name="user">
            <input type="submit" value="win">
        </form>
    </section>
    <section>
        <p>please <span id="sign"> sign up</span> for only 10 dollars. Maybe you will win one of the amazing products</p>
    </section>
    </body>
    </html>
    can someone please help me position everything under eachother and put it in th emiddle of the page
    Last edited by VIPStephan; 09-21-2013 at 01:25 PM. Reason: fixed code BB tags

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,680
    Thanks
    0
    Thanked 230 Times in 225 Posts
    Hi there lorenzo456,

    and a warm welcome to these forums.

    Does this help...
    Code:
    
    <!DOCTYPE html>
    <html>
    <head>
    
    <meta charset="utf-8">
    
    <title>Lucky lottery</title>
    
    <link rel="stylesheet" type="text/css" href="style.css">
    
    <style>
    section {
        width:898px;
        margin:10px auto;
        text-align:center;
     }
    #images {
        padding:10px 10px 0 0;
        margin:0;
        list-style-type:none;
        overflow:hidden;
     }
    #images li {
        float:left;
        margin:0 0 10px 10px;
     }
    #images img {
        display:block;
        width:200px;
        height:200px;
        padding:5px;
        border:1px solid rgba(0,0,0,0.5);
        border-radius:5px;
        box-shadow:5px 5px 5px rgba(0,0,0,0.5);
     }
    </style>
    
    </head>
    <body>
    
    <section>
     <h1>Lucky Lottery</h1>
    
     <form id="signup">
      <input type="submit" value="Sign up">
     </form>
    </section>
    
    <section>
     <ul id="images">
      <li><img src="http://i.imgur.com/CPL4LDK.png" alt="melk karton"></li>
      <li><img src="http://i.imgur.com/mdC666s.png" alt="ariel zeep doosje"></li>
      <li><img src="http://i.imgur.com/Kvw9Nc7.png" alt="fiets"></li>
      <li><img src="http://i.imgur.com/bm7vW1i.png" alt="man op strand"/></li>
      <li><img src="http://i.imgur.com/qhDC741.png" alt="starwars"></li>
      <li><img src="http://i.imgur.com/Wrhna5e.png" alt="tandenborstel"></li>
      <li><img src="http://i.imgur.com/GoWB6jj.png" alt="ponies"></li>
      <li><img src="http://i.imgur.com/BvNQjPC.png" alt="wii-u"></li>
     </ul>
    </section>
    
    <section id="under">
     <form action="html_form_action.asp" method="get">
      <input type="text" name="user">
      <input type="submit" value="win">
     </form>
    </section>
    
    <section>
     <p>Please sign up for only 10 dollars.</p> 
     <p>Maybe you will win one of the amazing products.</p>
    </section>
    
    </body>
    </html>
    coothead


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •