Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML或CSS中的间距_Html_Css - Fatal编程技术网

HTML或CSS中的间距

HTML或CSS中的间距,html,css,Html,Css,我遇到了一个需要编写HTML或CSS代码的任务。如何创建空间或设置定位? 我的任务是使页面看起来像这样: report1 report2 report3 report4 report5 report6 <html&g

我遇到了一个需要编写HTML或CSS代码的任务。如何创建空间或设置定位? 我的任务是使页面看起来像这样:

report1                                               report2
report3                                               report4
report5                                               report6
<html>
<body> 
<table border=1" > 
<tr><th>Col 1</th><th>Col 2</th></tr>
<tr>
<tr>
<td>Value 1a</td>
<td>Value 1b<td>
</tr>
<tr>
<td>Value 2a</td>
<td>Value 2b<td>
</tr>
</body>
</html>
在阅读和环顾四周之后,我尝试了这个代码

<font size=3>
 <a  href="http://obi-dev.jr.local:9704/analytics/saw.dll?bipublisherEntry&Action=open&itemType=.xdo&bipPath=%2FPrototype%2Fprice%20testing%20report.xdo&path=%2Fshared%2FPrototype%2Fprice%20testing%20report.xdo">
Price Testing Report </a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a  href="http://obi-dev.jr.local:9704/analytics/saw.dll?bipublisherEntry&Action=open&itemType=.xdo&bipPath=%2FPrototype%2Fprice%20testing%20report.xdo&path=%2Fshared%2FPrototype%2Fprice%20testing%20report.xdo">Price Testing Report 
     </a> 
</font>

所以我的问题是,标签是否有替代品? 有没有办法让它自动定位

请尽可能详细,因为我对HTML一无所知。 提前感谢大家

标签将保留您想要的空间。它还将包括任何特征线

<pre> 
Look      at     all    the spaces
and
the
break
lines
</pre>

看看所有的空间
和
这个
打破
线
正如Oberon在对该答案的评论中指出的那样。另一种方法(不那么受欢迎)是使用表

<td align="left">This Text is aligned to the left</td>

细胞

此文本向左对齐

我个人更喜欢使用不带表的简单方法,因此这是非表解决方案,对于任何想要非表方法的人来说都要简单得多:

CSS:

HTML:

你好你好
你好你好
你好你好
工作示例:


请不要创建多个ID来提交同一个问题:这里没有任何代码/标记可供实际检查以查看您所做的操作。看起来你删除了你的旧帖子,又写了一篇新帖子,因为我记得大约20分钟前看到过这篇帖子。@j08691:是同一个用户…不要删除旧帖子。改为编辑它。将问题重新发布为新问题是不合适的。看看当您提供代码时,响应会有多好?尽量不要在评论中如此冷嘲热讽。我是少数几个帮助你的人之一,即使我的评论看起来不那么鼓舞人心。如果你遵循一个小的协议,这个网站是非常有用的。通过发布代码来展示你的努力,正如你在这里看到的,尽量不要重复同样的问题。这次你没有被点燃,但很容易发生。你的声誉越高,人们就越有可能介入并提供帮助。谢谢你们两位提供的有用答案,有没有办法指定开始写作的位置或点?@user2730114你可以处理表格的不同属性(我编辑过)。或者您可以使用单独的div(完全不同的方法)来调整人们查看页面的方式。@user2730114问题是我根本没有经验,我是一个oracle人员,但我无意中发现我必须编写此代码,以便系统将其填充到文件的上下文中,并将其填充到页面中,所有的代码都将写在文本文件中,谢谢你的解释和帮助:)Dave这正是我想要的,不太复杂,但看起来很有组织,非常感谢你的帮助和分享代码,真的很感谢你,你救了我一命,再次感谢你。没有问题:)如果有帮助,请勾选我的答案。这是最理想的解决方案。您还可以将
元素环绕在父div周围,并将宽度设置为50%(或您希望分隔它的任何选项卡大小),以使其始终处于自动修复状态。更新的JSFIDLE有什么可以替代的吗?编辑:在div中使用
来保留选项卡文本。
<td align="left">This Text is aligned to the left</td>
//adjust the numbers how you see fit

.box{
    display:inline-block;
    vertical-align:top;
    width:50px;
    height:50px;
}
.push{
    margin-left:150px;
}
<div class="box"> Hello </div><div class="box push"> Hello </div> <br/>
<div class="box"> Hello </div><div class="box push"> Hello </div> <br/>
<div class="box"> Hello </div><div class="box push"> Hello </div> <br/>