English 中文(简体)
7个县没有在街区展示,但其他县则有
原标题:7 buttons are not displayed in the block but other buttons are
  • 时间:2012-01-13 17:46:48
  •  标签:
  • php
  • css

我的《特区法典》如下:它愿意在一行中展示我的县、7个县。 现在,这些纽扣地被展示在一片 block子中。 但问题是,第7个县没有在街区展示,而是自行展示,其他县则在街区展示。 为什么发生这种情况:

Below is php Code:

<table class="optionTypeTbl">
<tr>

        <?php
    $i = 1;
    foreach($num as $key => $val){
        echo"<input type="button" value="$val" id="btn".$val."" name="btn".$val."Name" class="gridBtns gridBtnsOff">";        
        if($i%7 == 0) echo"</td></tr><tr><td>";
        $i++;
    }
?>

        </tr>
        <tr>
        <td>
        <input class="gridBtns" name="btnTrueorFalseName"  id="btnTrueorFalse"  type="button"  value="True or False"  />
        <input class="gridBtns" name="btnYesorNoName"  id="btnYesorNo"  type="button"  value="Yes or No"  />
        </td>
        </tr> 
        </table>

Css:

.gridBtns{
    background-color: #ffffff;
    border: #666666 1px solid;
    color: black;
    font-weight:bold;
    }

.optionTypeTbl{
    display:none;   
    background-color:white;
    position:absolute;  
    border:1px solid black;
}
最佳回答

这可能与下列事项有关:在纽特州之前的缺失开标栏;td>。

如果你有7/14/21/etc的话,我还要再次rite,确保你最终不会有空行。 纽芬兰:

<table class="optionTypeTbl">
    <?php
    $i = 1;
    foreach($num as $key => $val){
        if($i%7 == 1) echo"<tr><td>";
        echo"<input type="button" value="$val" id="btn".$val."" name="btn".$val."Name" class="gridBtns gridBtnsOff">";        
        if($i%7 == 0) echo"</td></tr>";
        $i++;
    }
    ?>

<tr>
    <td>
    <input class="gridBtns" name="btnTrueorFalseName"  id="btnTrueorFalse"  type="button"  value="True or False"  />
    <input class="gridBtns" name="btnYesorNoName"  id="btnYesorNo"  type="button"  value="Yes or No"  />
    </td>
</tr> 
</table>
问题回答

页: 1

<table class="optionTypeTbl">
  <tr>
    <td> <!-- This is missing -->
    <?php
      // ...
    ?>
    </td> <!-- This is missing -->
    </tr>
    <tr>
    <!-- ... -->

作为附带说明,表格仅显示表格数据。 尤其就这一点而言,如果你所有的纽芬兰人都集中在一个囚室里,那么你就可以与<代码><div>实现完全相同的目标,那将更加“正确”,标记将大为附带。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签