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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    wtf am i doing wrong!

    This is such a lame thing to post about, but its busting my balls - iv been on w3schools for ages, i can see kinda whats wrong, but when i fix it it does nothing!!!!

    i cant get div tags to sit next to each other they just keep positioning themselves underneath each other


    HTML:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    title>Trade Quote Sign-in</title>

    <
    link href="stylesheets/style.css" rel="stylesheet" type="text/css" />
    </
    head>

    <
    body>
    <
    div class="container">

        <
    div class="logo_container" >

    <
    h1Tradequote.com </h1>
    </
    div>

            <
    div class="blurb">

    <
    pTradequote.com allows users to post details about their home design or repair work and have tradesman and Design or repair companys view quotes made to the client by other companys.</p>

    <
    p>Need some repair work done around the house? or want to re-do your kitchenLet us help you find someone to do the work at a reasonable price. - <a href="/signup.php" title="">Sign-up</a></p>
    </
    div>


                <
    div class="menu_container">

                <
    a href="/index.php" title="Go to the font page">Home</a>

                <
    a href="/about.php" title="">About</a>
    |
                <
    a href="/contact.php" title="">Contact</a>
    |
                <
    a href="/help.php" title="">Help</a>
    |
                <
    a href="/signup.php" title="">Sign-up</a>
    </
    div>

                    <
    div class="client_signin">
    <
    h2Client Sign-in</h2>
    <
    p>username:   
      <
    input name="username" type="text" size="30" />
    </
    p>
    <
    p>password:
      <
    input name="password" type="password" size="30" />
    </
    p>

    <
    p
      <
    input name="Sign-in" type="button" value="Sign-in" />
      <
    br />
      
    Sign-in to view quotes and manage your jobs</p>
                    </
    div>

                        <
    div class="tradesman_blurb">

    <
    h3> If you quoted a client on some work recently and they gave you our link or cardclick to sign-in below by entereing your Mobile number or Company email</h3>
    </
    div>

    <
    div class="tradesman_signin">
    <
    h1>Tradesman or Company Sign-in</h1>

    <
    p>Mobile Number:
      <
    br />
      <
    input name="Mobile Number" type="text" size="30" />
    </
    p>
    <
    p>Company email:
      <
    br />
      <
    input name="Company Email" type="text" size="30" />
    </
    p>

    <
    h1> OR </h1>

    <
    p>Mobile Number:
      <
    br />
      <
    input name="username" type="text" size="30" />
    </
    p>
    <
    p>Password:<br />
      <
    input name="pssword" type="password" size="30" />
      <
    br />
      <
    input name="Sign-in" type="button" value="Sign-in" />
      <
    br />
      
    Sign-in to view and manage your quotes</p>
    <
    table width="210" border="1">
      <
    tr>
        <
    td>Mobile number and company email are used to verfiy user only - <strong>we wont ever give it away</strong></td>
      </
    tr>
    </
    table><br />
    </
    div>

    <
    br />
    <
    div class="footer">
    <
    a href="/privacy.php" title="privacy">Privacy Policy</a> | <a href="/contact.php" title="Contact">Contact</a> | Copyright 2013 tradequote.com</div>
    </
    div>
    </
    body>
    </
    html
    CSS:
    PHP Code:
    @charset "utf-8";
    /* CSS Document */

    .container {
        
        
    width:900px;
    }

    .
    blurb {

        
    width:300px;
        
    float:left;
    }

    .
    logo_container {
        
        
    Width225px;

        
    }

    .
    menu_container {
        
        
    Width250px;
        
    padding-left300px;
        
    }

    .
    client_signin {

        
    Width200px;
        
    }

    .
    tradesman_blurb {
        
    float:right;
        
    Width350px;
        
    }

    .
    tradesman_signin {
        
        
    float:right;
        
    text-align:center;
        
    width450px;
        
    }

    .
    footer {
        
        
    width200px;
        
    float:left;
        


  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    339
    Thanks
    3
    Thanked 35 Times in 35 Posts
    Which divs do you want positioned next to each other?
    Frank

    How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello julz103,
    Three simple things you need:

    To get elements positioned side by side we use floats. See a float tutorial here.

    You also need to follow the box model rule. Make sure the width of your floats doesn't exceed the width of their containing elelment.

    And, last, you will probably need to clear your floats so their containing element behaves the way you want.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    I started messing around with it a little but, since I have no idea what your layout is supposed to look like ...

    Anyway, have a look at how h1#logo and your menu are side by side. Maybe this will give you some fresh perspective.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Trade Quote - Sign-in</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	background: #fc6;
    	font: 100% "Trebuchet MS", Arial, Helvetica, sans-serif;
    	color: #000;
    }
    #container { 
    	width: 900px; 
    	margin: 50px auto;
    	font-size: 1em;
    	overflow: auto;
    	background: #ccc;
    }
    h1#logo_container { 
    	height: 50px;
    	width: 225px; 
      	margin: 0;
    	float: left;
    	display: block;
    	font-size: 1.6em;
    	background: #f00 url(path/to/yourImage.jpg);
    }
    .menu_container {
    	line-height: 50px;
    	margin: 0 0 0 225px;
    	padding: 0 0 0 25px;
    }
    .blurb {
    	width: 300px;
    	padding: 0 16px;
    	float: left;
    }
    .client_signin { Width: 200px; }
    h3#tradesman_blurb {
    	float: right;
    	Width: 350px;
    }
    .tradesman_signin {
    	float: right;
    	text-align: center;
    	width: 450px;
    }
    .footer {
    	width: 200px;
    	float: left;
    }
    </style>
    </head>
    
    <body>
    <div id="container">
        <h1 id="logo_container"><a href="Tradequote.com">Tradequote.com</a></h1>
        <div class="menu_container"> 
            <a href="/index.php" title="Go to the font page">Home</a> | 
            <a href="/about.php" title="">About</a> | 
            <a href="/contact.php" title="">Contact</a> | 
            <a href="/help.php" title="">Help</a> | 
            <a href="/signup.php" title="">Sign-up</a> 
        <!--end .menu_container--></div>
            <div class="blurb">
                <p> 
                	Tradequote.com allows users to post details about their home design or repair work and have 
                    tradesman and Design or repair companys view quotes made to the client by other companys.
                </p>
                <p>
                	Need some repair work done around the house? or want to re-do your kitchen? Let us help you 
                    find someone to do the work at a reasonable price. - <a href="/signup.php" title="">Sign-up</a>
                </p>
            <!--end .blurb--></div>
        <div class="client_signin">
            <h2> Client Sign-in</h2>
            <p>username:
            <input name="username" type="text" size="30" />
            </p>
            <p>password:
            <input name="password" type="password" size="30" />
            </p>
            <p>
            <input name="Sign-in" type="button" value="Sign-in" />
            <br />
            Sign-in to view quotes and manage your jobs</p>
        <!--end .client_signin--></div>
            <h3 id="tradesman_blurb"> 
                If you quoted a client on some work recently and they gave you our link or card, 
                click to sign-in below by entereing your Mobile number or Company email
            </h3>
      <div class="tradesman_signin">
        <h1>Tradesman or Company Sign-in</h1>
        <p>Mobile Number: <br />
          <input name="Mobile Number" type="text" size="30" />
        </p>
        <p>Company email: <br />
          <input name="Company Email" type="text" size="30" />
        </p>
        <h1> OR </h1>
        <p>Mobile Number: <br />
          <input name="username" type="text" size="30" />
        </p>
        <p>Password:<br />
          <input name="pssword" type="password" size="30" />
          <br />
          <input name="Sign-in" type="button" value="Sign-in" />
          <br />
          Sign-in to view and manage your quotes</p>
        <table width="210" border="1">
          <tr>
            <td>Mobile number and company email are used to verfiy user only - <strong>we wont ever give it away</strong></td>
          </tr>
        </table>
        <br />
      </div>
      <br />
      <div class="footer"> <a href="/privacy.php" title="privacy">Privacy Policy</a> | <a href="/contact.php" title="Contact">Contact</a> | Copyright 2013 tradequote.com</div>
    </div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Tags for this Thread

    Posting Permissions

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