为什么我的wordpress页脚在字体页面上与我的其他页面不同?

时间:2013-09-26 22:39:32

标签: html wordpress

在我的网站上,首页的页脚比其他页面的页脚略窄,每侧留下约30像素的空白边距。我在Worpress工作。有没有人见过这个问题?

<?php get_header(); ?>  
<!-- ADVERTISEMENT-->
<div style="height:150px; width:250px; background-color:#0072bc; float: right; margin-right:5%;"><p style="color:white; font-size:2em; text-align:center; line-height: 75px;">Advertisement Placeholder</p></div>


<div style="border-radius:5px;background-color:orange;text-align:center; width:650px;height:50px;margin-bottom:10px;"><p style="color:white;font:bold;font-size:3em;line-height:50px;">STEP 1 to finding The Right Car</p></div>
<table style="width: 600px; border:3px solid black">
<thead>
<tr>
<th style="text-align: center; font-size: 20; padding: 6px; background-color: #0072bc; color: white;" colspan="2">Begin with info that will be applied to all cars</th>
</tr>
</thead>
<tbody>
<tr>
<td>How many <b> miles </b> do you drive each year?</td>
<td><form action="step2" method="post"><input type="text" maxlength="5" name="miles" value="10000"></td>
</tr>
<tr>
<td>What is your local <b> gas price</b>?</td>
<td><input type="text" maxlength="4" name="GasPrice" value="3.75" /></td>
</tr>
<tr>
<td>How many <b> years </b> are you planning to use the car?</td>
<td><input type="text" maxlength="2" name="years" value="7" /></td>
</tr>
<tr>
<td>How much do you value <b> safety </b> on a scale of 0-10? (0=low, 5=Average 10=A lot)</td>
<td><input type="text" maxlength="2" name="safety" value="5" /></td>
</tr>
<tr>
<td>How much do you value the <b> condition</b> of a car on a scale of 0-10? (0=low, 5=Average 10=A lot)</td>
<td><input type="text" maxlength="2" name="valuecondition" value="5" /></td>
</tr>
<tr>
<td>What is your <b> tax rate </b> (Will soon ask for ZIP CODE)?</td>
<td><input type="text" maxlength="5" name="TaxRate" value="7.50" /></td>
</tr>
</tbody>
</table>



<div style="border:2px solid black;border-radius:10px; width:450px;float:left;height:70px;"><p style="width:450px;height:20px; color:black;">How many cars do you currently have to compare?</p>

<input type="radio" name="NumberOfCars" value="0" /> 0 Cars <input type="radio" name="NumberOfCars" value="1" /> 1 Car <input type="radio" name="NumberOfCars" value="2" /> 2 Cars <input type="radio" name="NumberOfCars" value="3" /> 3 Cars    <input type="radio" name="NumberOfCars" value="4" /> 4 Cars    <input type="radio" name="NumberOfCars" value="5" checked/> 5 Cars</div>


<br>
<!--SUBMIT BUTTON-->
<div style="clear: both; width: 112px; height: 29px; float:left; margin-left:275px;padding-top:7px;padding-bottom:10px;"><p style="text-align: center;"><input id="submitbutton" style="width: 112px; height: 29px; background-color: #0072bc; color: white;" type="submit" size="1" value="To The Cars!" /></p></div></form>

<?php get_footer(); ?>


<div class="clear"></div>
<!--Start Footer-->
<div class="footer-wrapper">
    <div class="footer">
        <div class="container_24">
            <div class="grid_24">
                <?php
                /* A sidebar in the footer? Yep. You can can customize
                 * your footer with four columns of widgets.
                 */
                get_sidebar('footer');
                ?>

            </div>
            <div class="clear"></div>
        </div>
        <div class="footersep"></div>
        <div class="clear"></div>
        <div class="footer-bottom-wrapper">
            <div class="footer-bottom">
                <div class="container_24">
                    <div class="grid_24">
                        <div class="copyrightinfo">
                            <div class="grid_12 alpha">
                            <p class="blogdes">  <span class="blog-desc">               
                                    <?php echo get_bloginfo('title'); ?>
                                    -
                                    <?php echo get_bloginfo('description'); ?>
                                </span></p>
                            </div>
                           <!-- <div class="grid_12 omega">
                            <?php if (infoway_get_option('infoway_footertext') != '') { ?>
                                <p class="copyright"><?php echo infoway_get_option('infoway_footertext'); ?> </p>
                            <?php } else { ?>
                                <p class="copyright"> <?php _e('<a href="http://www.inkthemes.com">Infoway Theme</a> powered by <a href="http://www.wordpress.org">WordPress</a>','infoway'); ?></p>
                            <?php } ?>
                                </div>-->
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
<!-- container -->
<?php wp_footer(); ?>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

似乎有几个关闭的div已经丢失了 - 可能是因为你的内容引入了新的div(或者编辑front-page.php文件时)

(特别是body_wrapperwrapper div似乎最终未被正确关闭,以及其他问题)

建议你先从'空白'或新的那个开始再添加内容,因为它有点难以诊断。

如果您有时间,最好避免使用内联样式(http://www.nomensa.com/blog/2011/inline-styles-and-why-they-are-considered-harmful-for-accessibility/),然后从基本HTML开始。

p / s:Infoway,您目前使用的主题是1.6.x版本,因此可能值得使用更新版本的主题文件,因为您的主题文件似乎是1.1.x?