html - No alternative for table layout? -
i understand. tables must used tabular data, not layout in case. used write code lots of tables, several years ago i've found ways replace them more appropriate structures in every situation. except one.
<ul> <li>we're up</li> <li>all night</li> <li>to get</li> <li>lucky</li> <li class="last_one"><input type="search" placeholder="i'm search"></li> </ul> here's fiddle: http://jsfiddle.net/4enmp/4/
i'm trying make menu here. requirements:
the menu must fill page horizontally [menu width: 100%]
all menu cells (except last one) should have random widths, depending on widths of contents [width of menu item = width of item's content]. means should not hardcoded.
the last menu item (with search input) should stretch fill remaining space. [last menu item fills space left].
the whole thing must support ie7+. it's silly. know. can nothing about. thankfully don't have bother ie6.
as i've illustrated in js fiddle, it's pretty easy tables (though don't claim it's 100% right, it's consistent across browsers).
i have not managed meet these 4 requirements unordered lists (see fiddle above). appreciate thoughts of how reach html , css only.
thanks lot help!
edit: here's desired menu design: 
i don't understand why need have input field in same element menu. serve pretty different functions. approach breaking input field out of unordered list, , floating right. uses little more html totally works.
Comments
Post a Comment