两个“块”左右对齐在同一条线上 [英] Two "blocks" left and right aligned on the same line

查看:106
本文介绍了两个“块”左右对齐在同一条线上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我一直试图让两个文本块对齐,一个左边,一个右边,在同一条线上。


我想模仿的是我在这里用表做的事情:
http://www.workmenforChrist.org (在网站地图链接下)


我尝试使用代码浮动块:

Hi Everyone,

I''ve been trying to get two blocks of text to be aligned, one left, one right, on the same line.

What I''m trying to mimic is what I did with tables here:
http://www.workmenforChrist.org (under the "Site Map" link)

I tried floating the blocks with the code:

展开 | 选择 | Wrap | 行号

推荐答案

min-width和max-width不起作用IE浏览器。


当你将任何东西设置为px时,它已被修复并且不会移动。您希望将宽度更改为百分比,当浏览器更改大小时,它将遵循其父级的宽度。
min-width and max-width do not work in IE.

When you set anything to px, it''s fixed and won''t move. You want to change the widths to percent, which will follow the width of their parent as the browser changes size.



min-width和max-width在IE中不起作用。


当你将任何东西设置为px时,它已被修复并且不会移动。您希望将宽度更改为百分比,当浏览器更改大小时,宽度将遵循其父级的宽度。
min-width and max-width do not work in IE.

When you set anything to px, it''s fixed and won''t move. You want to change the widths to percent, which will follow the width of their parent as the browser changes size.



谢谢,


我虽然弄清楚如何使用这两个块宽度的百分比但我遇到了麻烦。顺便说一句,这是我到目前为止:

http://www.workmenforChrist.org/testindex.html


我想知道如何用百分比来做这个的原因是主要页面设置为来自600-800像素。不小于600,不大于800.这两个街区,我希望它们像我提到的那样,在同一条线上,但右边一个,左边一个。现在当页面最宽,800时,我希望每个块最多只有350个。当最小的600,那么我希望它不大于/小于300(这样两个块将在中间相遇,一半600.(但现在我看到一半将需要制作块298,如果它'在其他两个街区内,对吧?)


我怎么能用百分比来表示,因为当页面最小时,它会是50%,但是当它是'在它最大的情况下,块将下降到整个页面的43.75%。这就像我必须将最小宽度设置为50%,最大值设置为43.75%?

然后我仍然有问题,因为它们是浮动的,最新消息介于它们之间。


Sheesh ...我只是想尝试执行这个网站最奇怪的事情还是这些常见问题?


感谢您的持续帮助,我非常感谢您所做的一切,帮助我过渡到CSS! br />

~Michael

Thanks,

I am having trouble though figuring out how I can use percents with the width of those two blocks though. By the way, here is what I have so far:

http://www.workmenforChrist.org/testindex.html

The reason I wonder about how to do it with percents, is the main page is set to go from 600-800 pixels. No smaller than 600, no larger than 800. The two blocks, I want them to be like I mentioned, on the same line but one on the right, one on the left. Now when the page is at it''s widest, 800, I want each block to only be 350 at most. When at the smallest, 600, then I want it no larger/smaller than 300 (that way the two blocks will meet in the middle, half of 600. (but now I see half would have to make the blocks 298, if it''s inside two other blocks, right?)

How can I use percent for that though, because when the page is smallest, it would be 50%, but when it''s at it''s largest, the blocks would go down to 43.75% of the whole page. It''s like I would have to put min-width at 50%, and max at 43.75%?

Then I still have the problem with how, because they are floating, the Latest News goes in between them.

Sheesh . . . am I just trying to perform the oddest of things with this website or are these common troubles?

Thanks for the continued help, I do appreciate all you''ve been doing to help me with this transition to CSS!

~Michael


我开始认为这是不可能的用CSS做我正在寻找的东西。我似乎仍然无法开始思考可能有用的东西。我正在搜索和测试,但没有任何工作。


~Michael
I''m beginning to think it''s impossible to do what I''m seeking, with CSS. I still cannot seem to even begin to think about what may work. I''m searching, and testing, but nothing is working.

~Michael


这篇关于两个“块”左右对齐在同一条线上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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