为什么浮动:正确导致换行? [英] Why does float:right cause a line break ?
问题描述
为什么浮动:正确导致换行?请尝试下面的代码。是否有一个
修复?我希望链接与文本在同一行。谢谢
< html>
< head>
< STYLE>
span.linkpos {float :对;明确:无;颜色:蓝色; }
< / style>
< / head>
< table border 1px>
< tr>
< td>
许多
项目的配置管理文档和图纸的来源。这些主要是工程设计文件。每个
理事会必须单独搜索...
< span class = linkpos>
< a href = details。 php?id = 3& Type_view = detail& Type_Submit =& key_word =>请参阅
详情< / a>
< / span>
< / td>
< / tr>
< / table>
< html>
Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks
<html>
<head>
<STYLE>
span.linkpos { float:right; clear: none; color:blue; }
</style>
</head>
<table border 1px >
<tr>
<td>
Source for configuration management documents and drawings from many
projects. These are primarily engineering design documents. Each
Directorate must be searched separately...
<span class=linkpos>
<a href=details. php?id=3&Type_view= detail&Type_Submit=&key_word= >see
details</a>
</span>
</td>
</tr>
</table>
<html>
推荐答案
leegold写道:
leegold wrote:
为什么浮动:正确导致换行?
Why does float:right cause a line break?
它(实际上)给出了你应用它显示的任何内容:块。元素与
显示:块前面有换行符。
-
David Dorward< http:// blog .dorward.me.uk /> < http://dorward.me.uk/>
首页是〜/ .bashrc的位置
It (in effect) gives whatever you apply it to display:block. Elements with
display:block have line breaks before them.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
leegold写道:
Hi,
leegold wrote:
为什么浮动:正确导致换行?请尝试下面的代码。有没有修复?我希望链接与文本在同一行。谢谢
Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks
你必须这样写:
< td>
< span class = linkpos>
< a href =详情。 php?id = 3& Type_view = detail& Type_Submit =& key_word = see
details< / a>
< / span>
许多
项目的配置管理文档和图纸的来源。这些主要是工程设计文件。每个
理事会必须单独搜索...
< / td>
浮动必须在静态之前元素,否则你的浏览器
无法识别浮动位置...
Chris
You have to write it this way:
<td>
<span class=linkpos>
<a href=details. php?id=3&Type_view= detail&Type_Submit=&key_word= see
details</a>
</span>
Source for configuration management documents and drawings from many
projects. These are primarily engineering design documents. Each
Directorate must be searched separately...
</td>
The float has to be before the static element, otherwise your browser
does not recognize where to float...
Chris
Chris Leipold于2005年8月在
comp.infosystems上写道。 www.authoring .stylesheets:
Chris Leipold wrote on 08 mrt 2005 in
comp.infosystems.www.authoring.stylesheets:
leegold写道:
leegold wrote:
为什么浮动:正确导致换行?请尝试下面的代码。有没有修复?我希望链接与文本在同一行。谢谢
Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks
你必须这样写:
< td>
< span class = linkpos>
< a href = details 。 php?id = 3& Type_view = detail& Type_Submit =& key_word = see
详情< / a>
< / span>
许多配置管理文档和图纸的来源/>项目。这些主要是工程设计文件。每个
理事会必须单独搜索...
< / td>
浮动必须在静态元素之前,否则您的浏览器无法识别浮动的位置...
You have to write it this way:
<td>
<span class=linkpos>
<a href=details. php?id=3&Type_view= detail&Type_Submit=&key_word= see
details</a>
</span>
Source for configuration management documents and drawings from many
projects. These are primarily engineering design documents. Each
Directorate must be searched separately...
</td>
The float has to be before the static element, otherwise your browser
does not recognize where to float...
浮动一个内联元素,如< span>是不合逻辑的,
因此浏览器似乎将其更改为块元素。
更好地使用< div> ;.
-
Evertjan。
荷兰。
(用我的电子邮件地址替换所有带点的十字架)
Floating an inline element like <span> is illogical,
therefore browsers seem to change it to a block element.
Better use a <div>.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)
这篇关于为什么浮动:正确导致换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!