< li>在导航栏中 [英] <li>'s in navbar

查看:67
本文介绍了< li>在导航栏中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此页面上 http://www.xs4all.nl/~hogen / MvK_nieuw /

我有一个由ul组成的水平菜单(有点可怕,这个,感觉更好

舒适的桌子,但是我继续阅读我应该用css代替

;-))

两个问题:

包含导航条div的宽度为760px。

有6个116宽的按钮加1px边框使:6 x 118px = 708px。

按钮的右侧也有4px填充,所以我总计

708px + 24px = 732 px。那我的其他28px哪里去了?


告诉我我不能加起来!


我不在乎,真的,我的按钮没有加起来,但我也想

解决最右手按钮没有正确对齐的问题。

我试图给它< li> ;它有自己的ID,但它的风格很明显,但是b $ b显然不是正确的,因为它没有任何影响。


如果有人可以帮助我,我将非常感激。

-

Groet,

Adriana

[如果你想通过电子邮件联系我,请扔垃圾]

On this page http://www.xs4all.nl/~hogen/MvK_nieuw/
I have a horizontal menu made up of an ul (bit scary, this, feel much more
comfortable with a table there, but I keep reading I should use css instead
;-))

Two questions:
the containing navbar div has a width of 760px.
There are 6 buttons of 116 wide plus a 1px border makes: 6 x 118px = 708px.
The buttons also have a 4px padding on the right, so I come to a total of
708px + 24px = 732 px. So where are my other 28px gone?

Do tell me I cannot add up!

I couldn''t care less, really, my buttons not adding up, but I also want to
solve the problem of the most right hand button not being aligned properly.
I have tried to give that <li> it''s own ID with it''s own style, but
obviously not in the right way, for it had no effect what so ever.

If some one could help me, I would be very grateful.
--
Groet,
Adriana
[throw rubbish out if you want to reach me by e-mail]

推荐答案

" A.Translator" < TR ************* @ yaBISHhoo.com>写道:
"A.Translator" <tr*************@yaBISHhoo.com> wrote:
在此页面上 http ://www.xs4all.nl/~hogen/MvK_nieuw/
我有一个由ul组成的横向菜单(有点可怕,这个,感觉更舒服,有一张桌子那里,但我一直在读我应该用css代替
;-)
两个问题:
包含navbar div的宽度为760px。


亲爱的。如果我的浏览器窗口宽度不是760px怎么办?

有6个116宽的按钮


你看看当用户增加时会发生什么字体

大小? (你需要使用一个合适的浏览器,因为Win IE不会调整你的

像素大小的文本 - 所以需要更大文本的用户无法读懂你

导航,只会离开你的网站。)

加1px边框使:6 x 118px = 708px。
按钮的右侧也有4px填充,所以我来了总计
708px + 24px = 732像素。那么我的其他28px去了哪里?


填充:2px 4px 2px 0;

保证金:2px 4px 2px 0;


所以'''也是24px的保证金。最后4px剩下

结束并在右侧创造了额外的差距(这确实是b $ b确实看起来大约是项目之间差距的两倍)。


以上所有假设一个合理的浏览器。 IE5将在116px内部填充边框和

填充,因此右侧将有更多空间



我不在乎,真的,我的按钮没有加起来,但我也想解决最右手按钮没有正确对齐的问题。
我试图给它< ;李>它有自己的风格,但显然不是正确的方式,因为它没有任何影响。
On this page http://www.xs4all.nl/~hogen/MvK_nieuw/
I have a horizontal menu made up of an ul (bit scary, this, feel much more
comfortable with a table there, but I keep reading I should use css instead
;-))

Two questions:
the containing navbar div has a width of 760px.
Oh dear. What if my browser window isn''t 760px wide?
There are 6 buttons of 116 wide
Have you looked to see what happens when the user increases the font
size? (You''ll need to use a proper browser as Win IE won''t resize your
pixel sized text - so the user who needs larger text can''t read you
nav and will just leave your site.)
plus a 1px border makes: 6 x 118px = 708px.
The buttons also have a 4px padding on the right, so I come to a total of
708px + 24px = 732 px. So where are my other 28px gone?
padding: 2px 4px 2px 0;
margin: 2px 4px 2px 0;

So there''s also 24px of margin to account for. The last 4px are left
over and create the extra gap on the right hand side (which does
indeed seem to be about twice as big as the gap between items).

All the above assumes a sensible browser. IE5 will plop the border and
padding inside the 116px so there will be a lot more space left over
on the right hand side.
I couldn''t care less, really, my buttons not adding up, but I also want to
solve the problem of the most right hand button not being aligned properly.
I have tried to give that <li> it''s own ID with it''s own style, but
obviously not in the right way, for it had no effect what so ever.




用于设置最右边按钮样式的任何样式规则必须比规则#navbar ul li a,

更具特定价值b#b所以#navbar ul li a#foo会工作,但只是#foo不会。除此之外

取决于你想要做什么。


史蒂夫


-

我的理论给你起见,我的异端邪说你愤怒,

我从不回信,你不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>



Any style rule you use to style the rightmost button has to be more
specific than the rule #navbar ul li a,
so #navbar ul li a#foo would work but just #foo wouldn''t. Beyond that
it depends on what you''re trying to do.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


2005年2月24日星期四09:25:31 +0000,Steve Pugh写道:
On Thu, 24 Feb 2005 09:25:31 +0000, Steve Pugh wrote:
因此,还有24px的保证金要考虑。最后4px结束并在右侧创建额外的间隙(确实看起来确实是项目之间差距的两倍)。


愚蠢的我,不考虑保证金。谢谢。

用于设置最右边按钮样式的任何样式规则都必须比规则#navbar ul li a更具体,所以#navbar ul li a#foo会
工作,但只是#foo不会。除此之外,这取决于你想要做什么。
So there''s also 24px of margin to account for. The last 4px are left
over and create the extra gap on the right hand side (which does
indeed seem to be about twice as big as the gap between items).
Stupid of me, not taking the margin into account. Thanks.
Any style rule you use to style the rightmost button has to be more
specific than the rule #navbar ul li a, so #navbar ul li a#foo would
work but just #foo wouldn''t. Beyond that it depends on what you''re
trying to do.




谢谢你,我试过了,但会再试一次。


我也会查看字体大小。我现在处于早期阶段

重新设计一个旧网站,现在专注于导航栏。


-

Groet ,

Adriana

[如果你想通过电子邮件联系我,请扔垃圾]



Thank you, I tried that, but will try again.

I''ll have a look at the font-size too. I am in the early stages of
redesigning an old site and concentrating on the navbar for now.

--
Groet,
Adriana
[throw rubbish out if you want to reach me by e-mail]


On Thu ,2005年2月24日09:25:31 +0000 Steve Pugh写道:
On Thu, 24 Feb 2005 09:25:31 +0000 Steve Pugh wrote:
" A.Translator" < TR ************* @ yaBISHhoo.com>写道:
"A.Translator" <tr*************@yaBISHhoo.com> wrote:
在此页 http://www.xs4all.nl/~hogen/MvK_nieuw/
我有一个由ul组成的水平菜单(有点可怕,这个,感觉很多) />更多
舒适的桌子,但我继续阅读我应该使用CSS
而不是
;-))
两个问题:
包含navbar div有宽度为760px。
On this page http://www.xs4all.nl/~hogen/MvK_nieuw/
I have a horizontal menu made up of an ul (bit scary, this, feel much
more
comfortable with a table there, but I keep reading I should use css
instead
;-)) Two questions:
the containing navbar div has a width of 760px.



亲爱的。如果我的浏览器窗口宽度不是760px怎么办?


Oh dear. What if my browser window isn''t 760px wide?




你总是不得不抱怨和抱怨该死的宽度问题。

哦亲爱的如果我正在使用PDA或手机怎么办?

760< 800。对还是错?



You always have to bitch and whine about damn width issues.
Oh dear, what if I''m using a PDA or a cell phone?
760<800. True or false?


这篇关于&lt; li&gt;在导航栏中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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