Html 使用CSS从查询大小创建按钮数组

Html 使用CSS从查询大小创建按钮数组,html,css,mysqli,Html,Css,Mysqli,注意我发现了这个问题,我以为它只是没有显示第二个单词,实际上它不在CSS中。我从提交按钮中删除了所有CSS,我仍然只是显示robert$_post也只显示了robert 如果我 我想在页面上保持5列,我想让它根据结果改变“单元格”的数量。我希望纽扣是统一的。到目前为止,我已经拥有了所有这些,但是每个按钮中的文本都可能超过按钮的尺寸,因此它可以切掉部分名称。例如,robert tables仅显示robert 我找不到按钮的自动文本大小设置,是否存在?如果是,它是什么?它将如何使用? 此外,如果您能

注意我发现了这个问题,我以为它只是没有显示第二个单词,实际上它不在CSS中。我从提交按钮中删除了所有CSS,我仍然只是显示
robert
$_post也只显示了
robert
如果我

我想在页面上保持5列,我想让它根据结果改变“单元格”的数量。我希望纽扣是统一的。到目前为止,我已经拥有了所有这些,但是每个按钮中的文本都可能超过按钮的尺寸,因此它可以切掉部分名称。例如,
robert tables
仅显示
robert

我找不到按钮的自动文本大小设置,是否存在?如果是,它是什么?它将如何使用?
此外,如果您能帮我做得更好,我们将不胜感激,但请记住,我才刚刚开始,所以请您慢慢来。

请按以下方式更改结构

1. #cellnopad to .cellnopad
2. #submitbtn to .submitbtn
3. <td id='cellnopad'> to <td class='cellnopad'>
4. <input type='submit' id='submitbtn' name='name' value=".$row['name']."  to <input type='submit' class='submitbtn' name='name' value=".$row['name']." />
   You also need to close <input> tag.   
5. .submitbtn {
       height: 40px; // instead of height: 100%;
   }
1#cellnopad到,cellnopad
2. #submitbtn到。submitbtn
3.到

4. 凯普罗斯能够回答这个问题


value=“.$row['name']”。
需要是
value=”。“$row['name']”。

输入标记的捕捉效果很好。我会仔细阅读你发布的链接。在过去的几天里,我读了很多关于css的书,认为#是获得成功的途径,但事实并非如此。它似乎更多的是如何
echo'正在读取
行$['name']
。可以使用trim()函数从$row['name']中删除额外的空格。
echo "<form action='individual.php' method='post'>";
$column = 0;
echo "<table class='fullheight' >";

   while($row = $rs->fetch_assoc()) {
        if ($column == 0) {
        echo "<tr>";
        }
    echo "<td class='cellnopad'><input type='submit' class='submitbtn' name='name' value=".$row['name']." ></td>";

    $column++;
        if ($column >= 5) {echo "</tr>";
        $row++;
        $column=0;
        }
    }
    echo "</table>";
echo "</form>";



html{padding:0;
      height:100%;
      border:none;
      }

body {
    background-color: #93929F;
    background-image: url("shield1.png");
    background-repeat: no-repeat;
    background-position: 50% 10%;
    margin:0;
      padding:0;
      height:100%;
      border:none;
    }   

form {
    height: 90%;
    }

.fullheight{
    height:85%;
    width: 100%;
}

.cellnopad{
width: 20%;
padding:0px 0px;
}

/* copied this from an example and tweak*/
.submitbtn{
height:100%;
width: 100%;
opacity: 0.5;
cursor:pointer; /*forces the cursor to change to a hand when the button is hovered*/
padding:5px 0px; /*add some padding to the inside of the button*/
background:#35b128; /*the colour of the button*/
border:1px solid #33842a; /*required or the default border for the browser will appear*/
/*give the button curved corners, alter the size as required*/
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
/*give the button a drop shadow*/
-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);
/*style the text*/
color:#f3f3f3;
font-size:1.1em;
}
/***NOW STYLE THE BUTTON'S HOVER AND FOCUS STATES***/
.submitbtn:hover,.submitbtn:focus{
background-color :#399630; /*make the background a little darker*/
/*reduce the drop shadow size to give a pushed button effect*/
-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;
/*style the text*/
color:#ffff00;
font-size:1.2em;
}
1. #cellnopad to .cellnopad
2. #submitbtn to .submitbtn
3. <td id='cellnopad'> to <td class='cellnopad'>
4. <input type='submit' id='submitbtn' name='name' value=".$row['name']."  to <input type='submit' class='submitbtn' name='name' value=".$row['name']." />
   You also need to close <input> tag.   
5. .submitbtn {
       height: 40px; // instead of height: 100%;
   }