0

当您购买产品时,我正在尝试创建像 Apple 一样的产品摘要(侧边栏)。我正在使用 Magellan,它似乎会在 960 像素以下的任何宽度处破坏页面。它可能与表有关。我不确定任何帮助或建议将不胜感激。就像下面的照片:

在此处输入图像描述.

<div data-magellan-expedition="fixed">
    <div class="large-2 columns right" >
        <div id="top">
            <h5>Summary</h5>
            <h4>Business Cards</h4>
        </div>

        <div id="summary">
            <table>
                <tbody>
                    <tr><td>Digital</td></tr>   
                    <tr><td>3.5 * 2</td></tr>     
                    <tr><td>Qty: 50,000</td></tr>
                    <tr><td>14 Point C2S</td></tr>
                    <tr><td>Color Front, Empty Back</td></tr>      
                    <tr><td>5 Business day turnaround</td></tr>    
                    <tr><td>5 Business day turnaround</td></tr>  
                    <tr><td>5 Business day turnaround </td></tr>
                </tbody>
             </table>

             <h5>Your Price:      $64.5</h5>
             <h5> Unit Cost:      $0.323</h5>
             <a href="#" class="small radius success button">Get Started</a>
        </div>
    </div>
</div>
4

1 回答 1

0

女巫的一个问题可能是桌子宽度。尝试添加 #top table { width: 100%;}

当您使用 F5 并且它不支持旧的 IE 浏览器时,您可以实现更多的 HTML5 和 CSS3 结构:

<data-magellan-expedition="fixed">
<section id='business' class='large-3 medium-12 columns right'>
    <header>
        <h1>Summary</h1>
        <p>Business Cards</p>
    </header>
    <article>
        <table class='debug'>
            <tbody>
                 <tr><td>Digital</td></tr>   
                 <tr><td>3.5 * 2</td></tr>     
                 <tr><td>Qty: 50,000</td></tr>
                 <tr><td>14 Point C2S</td></tr>
                 <tr><td>Color Front, Empty Back</td></tr>      
                 <tr><td>5 Business day turnaround</td></tr>    
                 <tr><td>5 Business day turnaround</td></tr>  
                 <tr><td>5 Business day turnaround </td></tr>
           </tbody>
       </table>
       <p class='price'>Your Price:      </p>
       <p class='price'> Unit Cost:      </p>
       <a href="#" class="small radius success button">Get Started</a>
    </article>
</section>
</div>

它更具语义性,并且具有更多逻辑轮廓。您可以在#business 中定位标签:

#business table { width: 100% }
#business > header {}
#business > article {}
#business > header > h1 {} 

与您匹配的示例标记示例:

.debug {border: 1px solid red;}
/* Bussines root modifiers */
#business table { width: 100%;}

/* Bussines #top */
#business > header {
    /* Target former #top */
}

#business > header > h1 {
    font-size: 2rem;
    margin: 0px;
    padding: 0px;
}

#business > header p {
    font-size: 2.5rem;
    margin: 0px;
    padding: 0px;
}

/* Business #summary */

#business > article {
    /* Target former summary */
}

/* Price specs */
.price {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0px; padding: 0px;
}
.price:last-of-type {margin-bottom: .5rem;}

Github 要点 > https://gist.github.com/anonymous/8915089

如果它不能解决您的问题,请发布更多信息。就像 whera 是图像中的复选框等等。

于 2014-02-10T12:45:32.627 回答