- This topic is empty.
-
AuthorPosts
-
November 20, 2012 at 3:06 pm #40896sclaytonMember
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;}
RestaurantNeighborhoodTypeMealPriceTakes 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!!!
November 20, 2012 at 3:10 pm #114952Paulie_DMemberI know little of PHP but it’s injecting divs into tables cells…that doesn’t feel right.
November 20, 2012 at 3:18 pm #114954sclaytonMemberWhat should I use in place of divs then? Thank you for the input.
November 20, 2012 at 3:21 pm #114956pmac627ParticipantI’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.
November 20, 2012 at 3:27 pm #114958sclaytonMemberI’ll try that. Cool! Thanks for the help!
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.