回复:“简单”按钮 - 可能没有表格? [英] Re: "simple" buttons - possible without tables?
问题描述
嗯...有人吗? :)
Anze
Anze写道:
Hmmm... anyone? :)
Anze
Anze wrote:
嗨!
我正在寻找一种能够显示的清洁解决方案。像这样,但是
我只是用完了想法:
-----
< table border =" 0" CELLPADDING = QUOT; 0" CELLSPACING = QUOT; 0" style =" border:1px solid
#d4d4d4;">
< tr>
< td style ="填充:1px; background-color:#ffffff;">
< input type =" submit" value =" test 123" style =" height:18px;
background:#e9eaea url(gradient.gif)left top repeat-x; width:auto;
border:none;填充:0px 10px; />
< / td>
< / tr>
< / table>
-----
(我附上了一张图片 - 高度为18px的按钮和自动宽度
的白色边框为1px及其周围1px的深灰色边框。按钮背景的
必须是渐变图像。
我试过这个:
-----
< div class =" button">
< input type =" submit"类= QUOT按钮" value =" test 123" />
< / div>
-----
CSS:
--- -
div.button {
显示:内联;
border:1px solid#d4d4d4;
background -color:#ffffff;
填充:1px;
}
input.button {
背景:# e9eaea url(gradient.gif)left top repeat-x;
padding:0px;
margin:0px 10px;
border:none;
身高:18px;
行高:18px;
}
-----
如果显示div.button:block;然后我不能将宽度设置为自动。在
另一方面,如果它是内联的,我就不能指定高度。
当然,我正在寻找跨浏览器的无攻击解决方案。否则我会用b $ b而不是表。 ;)
这可能吗?
我将不胜感激。
谢谢,
Anze
Hi!
I am looking for a cleaner solution that would display sth. like this, but
I simply ran out of ideas:
-----
<table border="0" cellpadding="0" cellspacing="0" style="border: 1px solid
#d4d4d4;">
<tr>
<td style="padding: 1px; background-color: #ffffff;">
<input type="submit" value="test 123" style="height: 18px;
background: #e9eaea url(gradient.gif) left top repeat-x; width: auto;
border: none; padding: 0px 10px;" />
</td>
</tr>
</table>
-----
(I have attached an image - a button of height 18px and auto width that
has a white border of 1px and around it a dark-gray border of 1px. The
background of the button must be a gradient image)
I have tried this:
-----
<div class="button">
<input type="submit" class="button" value="test 123" />
</div>
-----
CSS:
-----
div.button {
display: inline;
border: 1px solid #d4d4d4;
background-color: #ffffff;
padding: 1px;
}
input.button {
background: #e9eaea url(gradient.gif) left top repeat-x;
padding: 0px;
margin: 0px 10px;
border: none;
height: 18px;
line-height: 18px;
}
-----
If div.button is display:block; then I can''t set width to auto. On the
other hand if it is inline I can''t specify height.
Of course, I am looking for cross-browser no-hacks solution. Otherwise I''d
rather resort to tables. ;)
Is this possible?
I would appreciate some help.
Thanks,
Anze
推荐答案
Anze写道:
Anze wrote:
嗯...有人吗? :)
Hmmm... anyone? :)
编号当您向Usenet发布附件时,您排除了建设性的讨论 - 特别是因为您未能提供URL。好吧,一个绝对的
网址,就是这个。
-
Yucca, http://www.cs.tut.fi/~jkorpela/
No. When you posted an attachment to Usenet, you excluded constructive
discussion - especially since you failed to provide a URL. Well, an absolute
URL, that is.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
>嗯......有人吗? :)
>Hmmm... anyone? :)
>
否。当您发布Usenet的附件时,您排除了建设性的讨论
讨论 - 特别是因为您未能提供URL。好吧,这是一个
的绝对URL。
>
No. When you posted an attachment to Usenet, you excluded constructive
discussion - especially since you failed to provide a URL. Well, an
absolute URL, that is.
对不起,我认为邮件足够清晰,图片只是一个额外的
奖金。
以下是网址:
http:/ /users.volja.net/anzesk/usenet/test.html
我仍然会对此有任何想法。我可以找到很多变通办法
但不是......正确的方法(tm)。 :)
谢谢,
Anze
Sorry, I thought the mail was clear enough and the image was just an added
bonus.
Here is the URL:
http://users.volja.net/anzesk/usenet/test.html
I would still appreciate any thoughts on this. I can find many workarounds
but not... The Right Way (tm). :)
Thanks,
Anze
周三,2008年10月8日00:05:48 +0200,Anze< an ****** @ volja.netwrote:
On Wed, 08 Oct 2008 00:05:48 +0200, Anze <an******@volja.netwrote:
>>嗯......有人吗? :)
>>Hmmm... anyone? :)
不。当您向Usenet发布附件时,您排除了建设性的讨论 - 特别是因为您未能提供URL。好吧,
绝对URL,即。
No. When you posted an attachment to Usenet, you excluded constructive
discussion - especially since you failed to provide a URL. Well, an
absolute URL, that is.
抱歉,我认为邮件足够清晰,图片只是一个额外的
加值。
Sorry, I thought the mail was clear enough and the image was just an added
bonus.
不在usenet非二进制组上。
Not on usenet non-binary groups.
>
以下是网址:
http://users.volja.net/anzesk/usenet/test.html
我还是会感激任何想法就此而言。我可以找到许多解决方法
但不是......正确的方法(tm)。 :)
>
Here is the URL:
http://users.volja.net/anzesk/usenet/test.html
I would still appreciate any thoughts on this. I can find many workarounds
but not... The Right Way (tm). :)
我认为当你停止使用表时,我可能不会如此努力地控制布局
,并接受妥协。还要检查
其他主流浏览器如何呈现标记。
我很想在这里使用表格布局几个按钮:
http://bugsplatter.id.au/cc2ip/
>
但是没有 - 形式有效,它呈现跨浏览器(我不是真的对于msie-6,而不是我的目标受众).B br />
格兰特。
-
http://bugsplatter.id.au/
I think it may be a case of not trying so hard to control the layout
when you stop using tables, and accept the compromise. Also check
how other major browsers are rendering the markup.
I was tempted to use table layout for a couple buttons here:
http://bugsplatter.id.au/cc2ip/
But didn''t -- the form works, it renders cross-browser (I don''t really
care about msie-6, not my target audience).
Grant.
--
http://bugsplatter.id.au/
这篇关于回复:“简单”按钮 - 可能没有表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!