I am still very new to all of this and looking for a bit of guidance.
So I am generating a table with buttons from a query:
$column = 0;
echo "<table class='fullheight' >";
while($row = $rs->fetch_assoc()) {
if ($column == 0) {
echo "<tr>";
}
echo "<td ><input type='button' class='submitbtn' value='".$row['name']."'> </td>";
$column++;
if ($column >= 5) {echo "</tr>";
$column=0;
}
}
echo "</table>";
Some of the style sheet entries:
.fullheight{
height:85%;
width: 100%;
}
.submitbtn{
height:100%;
width: 100%;
opacity: 0.5;
cursor:pointer;
padding:5px 0px;
background:#35b128;
border:1px solid #33842a;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: 0 0 4px rgba(0,0,0, .75);
-moz-box-shadow: 0 0 4px rgba(0,0,0, .75);
box-shadow: 0 0 4px rgba(0,0,0, .75);
color:#f3f3f3;
font-size:1.1em;
}
.submitbtn:hover,.submitbtn:focus{
background-color :#399630;
-webkit-box-shadow: 0 0 1px rgba(0,0,0, .75);
-moz-box-shadow: 0 0 1px rgba(0,0,0, .75);
box-shadow: 0 0 1px rgba(0,0,0, .75);
opacity: 1;
color:#ffff00;
font-size:1.1em;
}
I am trying to learn CSS and to build a page the "correct" way.
I have the table generated within the content part of my page.
My question at this point is: Should I be generating a table to do the layout of these buttons, and if not, How do I iterate the the placement of the buttons using CSS?
I ask as I am already starting to run into issues with the text size within the buttons, especially during windows resize.