带CSS的HTML标头添加了额外的一行

时间:2012-09-19 19:36:24

标签: html css alignment

我有这个问题,用CSS对齐底部到右边。 我在this topic进行了管理。但现在我有这个奇怪的问题, 右侧按钮再次作为另一行打印,但CSS不适用于它们。看图片! Header

这是生成标题的PHP文件的一部分:

<link rel="stylesheet" href="/css/horizontal_navbar.css" type="text/css" media="screen">
<table border="auto"  id="topbar" width="100%">
    <th class="alignleft"><a class="topbarlink" href="index.php">Ana Sayfa</a></th>
    <th class="alignleft"><a class="topbarlink" href="userstats.php?category=$category">Istatistik</a></th>
    <th class="alignleft"><a class="topbarlink" href="contact.php">Iletisim</a></th>
    <th class="alignleft"><a class="topbarlink" href="useful_links.php">Kaynaklar</a></th>
    <!-- align right, reverse order -->
    <th class="alignright"><a class="topbarlink" href=$lastlink_address>RightButton 2</a></th>
    <th class="alignright"><a class="topbarlink" href="./userprofile.php?username=$username">RightButton 1</a></th>
</table>

<hr>
<iframe align="right" src="http://www.facebook.com/plugins/like.php?href=$webaddress" frameborder="0"style="border:none; width:70px; height:80px"></iframe>
<br>

这是CSS的一部分:

table a.topbarlink{
    /* TOP, RIGHT, BOTTOM, and LEFT */
    float:left;
    margin:0px 0px 0px 0px;
    font-family: Futura, "Trebuchet MS", Arial, sans-serif;
    font-weight:bold;

    /* font-size:1em; */

    color:#069;
    background-color: #f2f2f2;
    text-decoration: none;
    border-bottom: 2px solid #ccc;
    border-top: 2px #ccc;
    border-right: 2px solid #ccc;
    border-left: 2px #ccc;

    /* Padding (ordered) */
    padding-top:0.2em;
    padding-right: 1em;
    padding-bottom:0.2em;
    padding-left: 1em;

    /*padding: 0.2em 0em;*/
    /*padding: 0.2em 0.8em;*/
}

table th.alignleft{
    float:left;
}

table th.alignright{
    float:right;
}

table a.rightlink{
    float:right;
}

它可能是什么原因?

0 个答案:

没有答案