SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    tables side by side

    I have an idea how to do it in theory...but not sure how to do it in reality.

    http://www.bui4ever.com/workout_progress.php

    Under stats, I have just one table right now, but I want to be able to put another same exact table next to it. I'm thinking I would do something like position: relative no? But I'm still not very good at the positioning.

    Css: http://www.bui4ever.com/architect.css

    Thanks!

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Float them.

    Code:
    table {
      float:left;
    }
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz
    Float them.

    Code:
    table {
      float:left;
    }
    Wouldn't that interfere with my other tables?

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might.

    You should validate your XHTML and CSS.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Enthusiast shineability's Avatar
    Join Date
    May 2005
    Location
    Mechelen [Belgium]
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Adding this rule to your CSS will indeed affect all of your tables, which is probably not what you want .

    You could:
    • Use inline CSS for the tables you want to float left.
      It is however best to keep your CSS in a seperate file.
      HTML Code:
      <table style="float: left;" ...>...</table>
    • Define a class selector
      HTML Code:
      // HTML
      <table class="left" ... >...</table>
      // CSS
      .left { float: left; }
    • Give an id to your table tags
      HTML Code:
      // HTML
      <table id="table1" ... >...</table>
      <table id="table2" ... >...</table>
      // CSS
      #table1, #table2 { float: left; }
    • ...

  6. #6
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kravvitz and shineability: Thank you for your assistance! I'll give it a try and let you guys know. Will give you guys rep points too. Thanks!

  7. #7
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did they disable rep points?

  8. #8
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome.

    Yes, they seem to have disabled the Reputation Point System here.

    I removed that from my signature.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

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