我该如何移动这个区块?

时间:2013-02-19 20:05:23

标签: css position word-wrap css-position textwrapping

我是编码的新手,所以如果这是一个基本问题,我很抱歉。我试图将文本放在屏幕的左侧,并在屏幕的右侧放置一个表格。我已设法准确定位两个项目,但由于某种原因,文本被迫错误地包装。

我想让文字显示如下:

“雇用你不会的人才 明天可以负担得起!“

然而,CSS中的某些内容正在强制文本像这样包装:

“雇用你不会的人才 被
能够负担得起明天!“

我认为这与我将表单放在文本右侧的方式有关。以下是控制文本的CSS:

.SimpleText { width:928px; margin:50px auto  auto  auto; padding-top: 18px; height:90px;} 
.SimpleText h2 { color:#fff; font:normal 30px  Georgia, "Times New Roman", Times, serif;     padding:0 0 0 40px; margin:0; background:url(images/h2_bg_simple_text.gif) left no-repeat;}<br>
.SimpleText p { color:#bbe2ed; font:normal 11px  Georgia, "Times New Roman", Times, serif; padding:0 0 0 60px; margin:0;}

以下是管理表单的css:

#formtest{ position: relative; float: right; left: 100px;}

以及它在html页面中的显示方式:

  <div class="SimpleText">
      <div id="formtest">

          <!--form is here !-->

      </div>

    <h2>Hire the talent you won't be <br />able to afford tomorrow!</h2>
    <p>Great talent you can depend upon</p>

  </div>

如何修复它以使其正确包裹?谢谢。

此外,表单位于iframe内部。以下是iframe的代码:

<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\"     src=\"formio.php" + window.location.search + "\" width=\"560\" height=\"677\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E&lt;a href=\"new_Form.php\" title=\"new_Form\"&gt;blan&lt;/a&gt;%3C/iframe%3E"));</script>
<noscript>
<iframe width="560" height="677" style="border:none; background:transparent;   overflow:hidden;"
 id="formfas" src="axyform.html">
&lt;a href="formio.php" title="new_Form"&gt;m&lt;/a&gt;
</iframe>
</noscript>

1 个答案:

答案 0 :(得分:0)

您可以通过扩展.SimpleText的宽度来解决此问题。例如:

.SimpleText {
    width:968px;
}

JS Fiddle Example

相关问题