开发者

How to set all elements in ul tag be same max width (with words wrap)?

开发者 https://www.devze.com 2023-01-25 20:13 出处:网络
So I have a list with buttons like: <ul> <li><FORM><INPUT type=\"button\" value=\"some page!\" onClick=\"window.open(\'http://www.pageresource.com/jscript/jwinopen.htm\',\'jwinop

So I have a list with buttons like:

<ul>
<li><FORM><INPUT type="button" value="some page!" onClick="window.open('http://www.pageresource.com/jscript/jwinopen.htm','jwinopen','width=400,height=200,left=0,top=100,screenX=0,screenY=100')"></FORM></li>
<li><FORM><INPUT type="button" value="other page!" onClick="window.open('http://www.adobe.com/devnet/air/samples_actionscript.html开发者_Go百科','samples_actionscript','width=400,height=200,left=0,top=100,screenX=400,screenY=100')"></FORM></li>
</ul>

I want all buttons to be size of max button and have some word wrap. How to do such thing? (IE6, firefox)


using css

ul > li > form input {width: 42px}

in this form will match all descendant <input>s


this should get you started:

input[type="button"], .ieButton {
    max-width: 150px;
    padding: 5px 10px;
    word-wrap: break-word;
    height: auto;
    background-color: red;
 }

but IE6 doesn;t recognise the css selector, so you ould give each buton a class 'ieButton and make bie6 specific css (odn't have a pc nearby, so i can't check ie for you)

0

精彩评论

暂无评论...
验证码 换一张
取 消