帮助H3元素漂浮在错误的地方 [英] Help with H3 element floating in the wrong place

查看:50
本文介绍了帮助H3元素漂浮在错误的地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发的网站有一个恼人的问题。这就是我看到

出现的问题:


在一个段落(< P>)中我开始使用一个''对齐的IMG标签=左''或

''align = right''(当然正确引用)。验证器抱怨

''align''不是一个合适的XHTML属性,但我还没有看到一个合适的

CSS替代方案效果相当好。


然后在该段后面有一个标题(H1 / H2 / H3 / H4)元素和

背景,并且存在问题:


1.在FireFox上,段落在

图像的一侧(左侧或右侧)很好地流动(< img align =''xxx''/>)但是如果该段落没有足够长的时间

跟随H *元素将显示为好像它在图像后面而不是

图像后。


2.在IE 7上,文本在图像周围没有很好的流动,只有第一个

行显示在图像旁边,其余部分在图像之后

但标题(H *)放置正确。


参见 http:// clientes。 coralys.com/Province...ousPanama.aspx 和借口

一些外观问题,我还不太关心字体和尺寸。


任何人都知道在

浏览器上我可能需要哪些技巧?之前它已经好了,但现在不行了。


Emilio

I have an annoying problem with the site I am developing. This is how I see
the problem appear:

In a paragraph (<P>) I start with an IMG tag that has an ''align=left'' OR
''align=right'' (with the proper quoting of course). The validator complains
that ''align'' is not a proper XHTML attribute but I have not seen a suitable
CSS alternative that works comparatively well.

Then after that paragraph there is a heading (H1/H2/H3/H4) element with
background and there is the problem:

1. On FireFox the paragraph flows nicely on the side (left or right) of the
image (<img align=''xxx''/>) but then if the paragraph is not long enough the
following H* element will display as if it was behind the image rather than
AFTER the image.

2. On IE 7 the text does NOT flow nicely around the image, only the first
line is shows beside the image and the rest of the paragraph AFTER the image
but the heading (H*) are properly placed.

See http://clientes.coralys.com/Province...ousPanama.aspx and excuse
some look issues, I am not too concerned about fonts and sizes just yet.

Anybody knows what trick I might need to have this work well on both
browsers? before it used to be ok for both but not anymore.

Emilio

推荐答案

.... 。 www.FocusOnPanama.com ....写道:
..... www.FocusOnPanama.com .... wrote:

我对我正在开发的网站有一个恼人的问题。这就是我看到

出现的问题:


在一个段落(< P>)中我开始使用一个''对齐的IMG标签=左''或

''align = right''(当然正确引用)。验证器抱怨

''align''不是一个正确的XHTML属性,但我还没有看到一个合适的

CSS替代方案效果相对较好。
I have an annoying problem with the site I am developing. This is how I see
the problem appear:

In a paragraph (<P>) I start with an IMG tag that has an ''align=left'' OR
''align=right'' (with the proper quoting of course). The validator complains
that ''align'' is not a proper XHTML attribute but I have not seen a suitable
CSS alternative that works comparatively well.



" float"?


try float:left;或浮动:对;

"float"?

try float: left; or float: right;


>

然后在该段后面有一个标题(H1 / H2 / H3 / H4)元素带有

背景并且存在问题:


1.在FireFox上,段落在<的一侧(左侧或右侧)很好地流动br />
图像(< img align =''xxx''/>)但是如果段落不够长,则H *元素后面的

将显示为在图像后面,而不是图像之后的

>
Then after that paragraph there is a heading (H1/H2/H3/H4) element with
background and there is the problem:

1. On FireFox the paragraph flows nicely on the side (left or right) of the
image (<img align=''xxx''/>) but then if the paragraph is not long enough the
following H* element will display as if it was behind the image rather than
AFTER the image.



现在查找清除


clear:left;或清楚:对;或清除:两者;

-

保重,


Jonathan

--- ----------------

LITTLE WORKS STUDIO
http://www.hittleWorksStudio.com


谢谢,确实如此。我之前使用的是清除但是现在我已经远离它了,因为它一直在抱怨它是无效的XHTML

但是再一次,CSS似乎没有提供任何替代不使用它的
,去图吧!所以我现在正在插入< br clear =" ..." / tag

那里。


同样适用于< div align =" center"它说它不合适XHTML

Transitional但是我找不到任何好的CSS替代品没有

有一些副作用或者一个浏览器或其他。


Emilio


" Jonathan N. Little" < lw ***** @ centralva.netwrote in message

news:da ************************* ** @ NAXS.COM ...
Thanks, that does it indeed. I was using the br clear before but now I
stayed away from it because it keeps complaining that it is not valid XHTML
but then again, CSS does not appear to offer any alternative to not
using it, go figure!. So I am just now plugging in the <br clear="..."/tag
there.

Same thing goes for <div align="center"it says it is not proper XHTML
Transitional but then I could not find any good CSS alternative that did not
have some side effect or one browser or the other.

Emilio

"Jonathan N. Little" <lw*****@centralva.netwrote in message
news:da***************************@NAXS.COM...

.... www.FocusOnPanama.com ....写道:
.... www.FocusOnPanama.com .... wrote:

>我对我正在开发的网站有一个恼人的问题。这就是我看到问题出现的方式:

在一个段落(< P>)中,我开始使用一个''align = left''或者
''align = right''(当然正确引用)。验证器
抱怨''align''不是一个正确的XHTML属性,但我还没有看到一个比较好的CSS替代品。
>I have an annoying problem with the site I am developing. This is how I
see the problem appear:

In a paragraph (<P>) I start with an IMG tag that has an ''align=left'' OR
''align=right'' (with the proper quoting of course). The validator
complains that ''align'' is not a proper XHTML attribute but I have not
seen a suitable CSS alternative that works comparatively well.



" float"?


try float:left;或浮动:右;


"float"?

try float: left; or float: right;


>>
然后在该段后面有一个标题(H1 / H2 / H3 / H4)背景元素有问题:

1。在FireFox上,段落在图像的一侧(左侧或右侧)很好地流动(< img align =''xxx''/>)但是如果段落不长则足够了跟随H *元素将显示为好像它位于
图像后面而不是图像之后。
>>
Then after that paragraph there is a heading (H1/H2/H3/H4) element with
background and there is the problem:

1. On FireFox the paragraph flows nicely on the side (left or right) of
the image (<img align=''xxx''/>) but then if the paragraph is not long
enough the following H* element will display as if it was behind the
image rather than AFTER the image.



现在查找清除


clear:left;或清楚:对;或清除:两者;


-

保重,


Jonathan

-------------------

LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com



..... www.FocusOnPanama.com ....写道:


##请不要顶一下##
..... www.FocusOnPanama.com .... wrote:

## Don''t top-post please ##

谢谢,确实如此。我之前使用的是清除但现在我已经远离它了,因为它一直在抱怨它无效XHTML
Thanks, that does it indeed. I was using the br clear before but now I
stayed away from it because it keeps complaining that it is not valid XHTML



你这样做似乎不理解也不需要* xhtml *。帮自己一个恩惠

并放弃它并使用html 4.01严格。

You do not appear to understand nor need *xhtml*. Do yourself a favor
and abandon it and use html 4.01 strict.


但是再一次,CSS似乎没有提供任何替代方案不是

使用它,去图吧!所以我现在正在插入< br clear =" ..." / tag


but then again, CSS does not appear to offer any alternative to not
using it, go figure!. So I am just now plugging in the <br clear="..."/tag
there.



不,你不应该使用弃用的html属性" align"和清除

等,但在你的样式表中定义


div {/ *无论* /}

.. someClass {/ *无论* /}

#someID {/ *无论* /}

No, your should not use deprecated html attributes "align" and "clear"
etc, but in your stylesheet define

div { /* whatever */}
..someClass { /* whatever */ }
#someID {/* whatever */ }


>

同样的事情是< div align =" center"它说它不合适XHTML

Transitional但是我找不到任何好的CSS替代品没有

有一些副作用或一个浏览器或另一个。
>
Same thing goes for <div align="center"it says it is not proper XHTML
Transitional but then I could not find any good CSS alternative that did not
have some side effect or one browser or the other.



div {width:80%;保证金:0自动; }


-

保重,


Jonathan

--- ----------------

LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


这篇关于帮助H3元素漂浮在错误的地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆