Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS help a noob out?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40896
    sclayton
    Member

    So I’m doing a database project for one of my classes, but ironically, I’m having some trouble getting my chart to work. It’s been a while since I’ve touched CSS, so I’m forgetting the fundamentals and it would be much appreciated if I could get someone’s help!

    This is the website, and there is an awkward gap and, not to mention, the columns are all kind of strange:[A La Mode](http://itp300.usc.edu/s/saraclay/Documents/wwwroot/alamode_project/results.php?neighborhoods=1&type=All&time=All “A La Mode”)

    This the code for most of the CSS parts of the page:

    #font {
    font-family:”Courier New”, Courier, monospace;
    font-size: 24px;
    }

    #font_nav {
    font-family:”Courier New”, Courier, monospace;
    font-size: 16px;
    color: #FFFFFF;
    background-color: black;
    }

    .restaurant, .neighborhood, .type, .meal, .price, .reservation, .group, .credit {
    padding: 1px; float:left;

    }
    .restaurant {
    width:140px;
    padding: 0px 10px 0px 30px;
    margin: 0px;
    background-color: #000;
    color: #FFF;

    }
    .neighborhood {
    width:125px;
    padding: 0px 20px 0px 15px;
    margin: 0px;
    background-color:#000;
    color: #FFF;
    }
    .type {
    width:100px;
    padding: 0px 0px 0px 30px;
    margin: 0px;
    background-color:#000;
    color: #FFF;
    }
    .meal {
    width:100px;
    padding: 0px 0px 0px 10px;
    margin: 0px;
    background-color:#000;
    color: #FFF;
    }
    .price {
    width:50px;
    padding: 0px 15px 0px 10px;
    ` margin: 0px;
    background-color:#000;
    color: #FFF;
    }
    .reservation {
    width:200px;
    padding: 0px 10px 0px 20px;
    margin: 0px;
    background-color:#000;
    color: #FFF;
    }

    .group {
    width:170px;
    padding: 0px 10px 0px 30px;
    margin: 0px;
    background-color:#000;
    color: #FFF;
    }

    .credit {
    width:130px;
    padding: 0px 10px 0px 10px;
    margin: 0px;
    background-color:#000;
    color: #FFF;

    }

    Restaurant

    Neighborhood

    Type

    Meal

    Price

    Takes reservations?

    Good for groups?

    Takes credit?



    while($currentrow=mysql_fetch_array($results))

    {

    echo “

    ” .
    $currentrow;
    echo ”
    ” .
    $currentrow;
    echo “
    “.
    $currentrow;
    echo “
    “.
    $currentrow;
    echo “
    “.
    $currentrow;
    echo “
    “.
    $currentrow;
    echo “
    “.
    $currentrow;
    echo “
    “.
    $currentrow;
    echo “
    “;
    }
    echo ““;
    ?>

    Thanks so much!!!

    #114952
    Paulie_D
    Member

    I know little of PHP but it’s injecting divs into tables cells…that doesn’t feel right.

    #114954
    sclayton
    Member

    What should I use in place of divs then? Thank you for the input.

    #114956
    pmac627
    Participant

    I’d use <span> tags inside the table cells if you really needed them, otherwise set the styles via the <td> tags (which for what you are doing, would work fine). Get rid of the <div tags and put those class attributes on the corresponding <td> tags instead. Your site has a bunch of <br> tags under your list of column headers. Remove those to get rid of the space between your data and headers.

    #114958
    sclayton
    Member

    I’ll try that. Cool! Thanks for the help!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.