jquery - How to set div widths to be max width of divs -
i have div elements setting length & width :
<div id="alldivs" style="width:600px;"> <div id="div1" class="mydiv" style="float: left; min-width:140px; max-width:185px;"> test text </div> <div id="div2" class="mydiv" style="float: left; min-width:140px; max-width:185px;"> test text 2 </div> </div>
how can width of each div element within #alldivs
set max width? in above illustration width of #div2
set width of #div1
#div2
contains more text , hence have greater width. guess utilize jquery iterate div elements find largest width element , set each div accordingly perhaps there cleaner method using css, or jquery using more elegant method?
what if set of divs in #divwrapper div , apply min max widths div. way should inherit above. simple. easy. clean.
jquery css
No comments:
Post a Comment