Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    Okay so i want two divtags to appear next to eachother vertcialy and go down, but i canīt do it. Here is the html code for the bodytag

    HTML Code:
    <body>
    <div id="head">Content for  id "head" Goes Here</div>
    <div id="main content">
      <p>Content for  id "main content" Goes Here</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <div id="left content">Content for  id "left content" Goes Here</div>
      <div id="right content">Content for  id "right content" Goes Here</div>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p class=".clear">&nbsp;</p>
    </div>
      </div>
    </body>
    and css

    HTML Code:
    @charset "macintosh";
    #main content #left content {
        float: left;
        width: 550px;
    }
    #main content #right content {
        float: right;
        width: 150px;
    }
    .clear {
        clear: both;
    }
    Any help`?

  2.  

  3. #2
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    #main content needs to be by itself, get rid of the spaces in those id's. I put underscores instead.

    Example:

    Code:
    @charset "macintosh";
    
    #main_content {
        width:700px;
    }
    
    
    #left_content {
        float: left;
        width: 550px;
    }
    
    #right_content {
        float: right;
        width: 150px;
    }
    
    .clear {
        clear: both;
    }
    Mark-up


    Code:
    <body>
    <div id="head">Content for  id "head" Goes Here</div>
    <div id="main_content">
      <p>Content for  id "main content" Goes Here</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <div id="left_content">
        <p>Content for  id "left content" Goes Here</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
      </div>
      <div id="right_content">
        <p>Content for  id "right content" Goes Here</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
      </div>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p class=".clear">&nbsp;</p>
    </div>
      </div>
    
    </body>

    Copy and paste this code, you can visually see it.
    Note the underscores in the id's both in the css and the markup.

  4. #3
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    so the .clear class is not necceseary at all?

  5. #4
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    Funny i tried to do it myself but it only works with your code.

    Well thx for the help man!

  6. #5
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    Yes the clear class is needed, it's in there. Don't forget I changed the id name in the markup AND in the css.

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    you can't have a space in an id attribute.

    make them main_column, left_column, and right_column.

    Edit: oops late on that one lol

  8. #7
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times

    while($get_it !== true){ continue; }

  9. #8
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    Isn't that 3?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:57 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com