0

我正在处理的网站有问题。这是这里的网站。顶部导航栏在手机/平板电脑视图中不合适。只在台式机上没问题。查看移动视图的图像:

我不想让它响应,但从手机或平板电脑它应该是相同的布局与滚动。导航代码没有问题。问题在于持有导航的 div。因为如果我删除导航并只使用文本,它会有同样的问题:

div的HTML代码:

<div class="outer top">
    <div class="inner">
        <div class="nav">
            <ul>
                <li>....</li>
                <li>....</li>
                <li>....</li>
            </ul>
        </div>
    </div>
</div>

CSS 代码:

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    border: 0 none;
    font-size: 100%;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
}

body {
    background: url(../images/bg.png) repeat-x #fff;
    color: #fff;
    font-family: Helvetica, Myriad Pro, Verdana;
    font-size: 14px;
    line-height: 1em;
}

.outer {
    width: 100%;
    float: right;
    display: block;
}

.top {
    background: #004481;    
}

.inner {
    width: 940px;
margin: 0 auto;
}

我已经使用了 100% 的宽度。但是,在手机/平板电脑上仍然不行。能不能给个解决办法...

4

2 回答 2

0

You could also consider to create a new stylesheet specific for your mobile/tablet devices. This makes sure that it will look right on all devices. You're already using Divs so that shouldn't be a problem.

于 2013-03-12T14:21:46.320 回答
0

我将您的代码放在 jsbin 中,但无法看到您所看到的内容。你能添加更多代码吗?

http://jsbin.com/ologix/1/edit

于 2013-03-12T14:00:10.950 回答