HTML& CSS页脚,iPhone上的宽度不足

时间:2012-05-24 21:24:27

标签: iphone html css

我有这个网站http://northshorelandscapefirm.ca/并且它在所有浏览器中看起来都很好,除了在iPhone上...页脚宽度比网页broswer短......有人知道我在说什么吗? / p>

这是我的代码

<div class="footerWrapper">
<div class="footer">

<div class="footerNav">
<ul>
<li><a href="home.php">Home</a></li>
<li><a href="about.php">About Us</a></li>
<li><a href="gallery.php">Gallery</a></li>
<li><a href="services.php">Services</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div><!--footerNav-->

<div class="footerContact">
<ul>
<li>Email - <span style="text-transform:lowercase"><a href="mailto:email@northshorelandscapefirm.ca">email@northshorelandscapefirm.ca</a> | <a href="mailto:email2@northshorelandscapefirm.ca">email2@northshorelandscapefirm.ca</a></span></li>
<li> | </li>
<li>PHONE - <a href="callto:+5555555555">555.555.5555</a> | <a href="callto:+5555555555">555.555.5555</a></li>
</ul>
</div><!--footerContact-->

和CSS

.footerWrapper{
    width:100%;
    background:#000;
    float:left;
    padding-bottom:20px;
}

.footerNav{
    padding-top:10px;
    margin: 0 auto;
    position: relative;
    width:1080px;
    z-index:1000;
}

.footerNav ul {
    list-style-type: none;
    margin: 0;
    padding: 0 0 0 8px;
}

.footerNav li {
    float: left;
}

.footerNav ul a {
    color: #FFFFFF;
    display: block;
    padding: 0 30px 0 0;
    text-decoration: none;
    font-size:36px;
    text-transform:uppercase;
}

.footer{
    margin: 0 auto;
    position: relative;
    width: 1101px;
    background-color:#888888;
    min-height:145px;
    opacity:0.44;
    filter:alpha(opacity=44);
}

.footerContact{
    margin: 0 auto;
    position: relative;
    width: 1200px;
    padding-top: 108px;
}

.footerContact ul {
    list-style-type: none;
    margin: 0;
    padding: 0 0 0 8px;
}

.footerContact li {
    float: left;
    color: #FFFFFF;
    display: block;
    padding: 0 30px 0 0;
    text-decoration: none;
    font-size:20px;
    text-transform:uppercase;
}

.footerContact Ul a{
    text-decoration:none;
    color:#FFFFFF;
}

它有很多代码,我知道,但如果有人能提供帮助,那将非常感激,

先谢谢了, J

1 个答案:

答案 0 :(得分:0)

关注Tony318的答案。你可以使用类似的东西:

if (window.navigator.userAgent.indexOf('iPhone') != -1) {
    //iphone specific code to resize footer
}