0

所以我的代码是这样的:

<div id="toolbar">
<div style='border: none; font-family: Arial, Helvetica, sans-serif;'>
    <font color="#fff">
        <marquee bgcolor="#000" direction="left" loop="25" width="95%">Welcome to 

the NabzZzolution Mercenarie Group of the AboveUltimate-HydraBlast Server! If you are a 

member please register yourself.</marquee>
    </font>
</div>
<div>
    <a style="text-align:left;"class="wsite-button wsite-button-small wsite-button-

highlight" href="http://aunabzzzolution.weebly.com/log-in.html" target="_blank">
    <span class="wsite-button-inner">Log In</span>
    </a>
</div>
</div>

以及它们是如何出现的:http : //aunabzzzolution.weebly.com/ 所以我希望登录按钮位于工具栏的第一行,而 marqeee 则位于其右侧。有人能帮帮我吗?预先感谢您的任何帮助。

此致, Tasos Papalyras

4

3 回答 3

1

使用 CSS 属性:display具有inlineor的属性inline-block

修改版(格式也正确):

<div id="toolbar" style="display:inline">
    <div style='border: none; font-family: Arial, Helvetica, sans-serif;display:inline;'>
        <font color="#fff">
            <marquee bgcolor="#000" direction="left" loop="25" width="90%">
                Welcome to the NabzZzolution Mercenarie Group of the AboveUltimate-HydraBlast Server! If you are a member please register yourself.
            </marquee>
        </font>
    </div>
</div>

<div style="display:inline;">
    <a style="text-align:left;"class="wsite-button wsite-button-small wsite-button-highlight;" href="http://aunabzzzolution.weebly.com/log-in.html" target="_blank">
        <span class="wsite-button-inner">Log In</span>
    </a>
</div>

示例:http: //jsfiddle.net/L8JfJ/

于 2012-12-30T18:59:40.897 回答
1

采用display:inline-block;

button {
   display:inline-block;
   // other props here
}
于 2012-12-30T18:59:46.343 回答
0

改变:

<font style="display: inline-block; width:80%">  // <== inline-block and width.
  ...
</font>

... 

<div style="text-align:left; display:inline-block">      // <== inline-block
    <div style="height: 10px; overflow: hidden;"></div>

    <a class="wsite-button wsite-button-small wsite-button-highlight"  href="http://aunabzzzolution.weebly.com/log-in.html" target="_blank">
        <span class="wsite-button-inner">Log In</span>
    </a>
    <div style="height: 10px; overflow: hidden;"></div>
</div>
于 2012-12-30T19:11:39.370 回答