开发者

CSS div table line with dynamic sizes

开发者 https://www.devze.com 2023-04-02 00:24 出处:网络
Here\'s what I need. It\'s fully crossbrowseer (if add some styles) http://jsfiddle.net/Jkz5f/8/ but it\'s not good solution, because used constant p开发者_C百科ositions

Here's what I need. It's fully crossbrowseer (if add some styles)

http://jsfiddle.net/Jkz5f/8/

but it's not good solution, because used constant p开发者_C百科ositions

And this line with floats

http://jsfiddle.net/Jkz5f/5/

but if you add "b" string it's will be crash

Does anyone know fully-crossbrowser solution

without (display:table) and without constant margins for ".b"?


using elements as divs isn't a good idea. Just do this:

<div id="table">
            <div class="tr">
                <div class="a"><a href="#">a</a></div>
                <div class="b"><a href="#">bbbbbbbbbb</a></div>
<!-- and so on -->
            </div>
    </div>

of couse, add all the columns you need. Then float everything to the left and add a clear:both to .a, .b ,.c divs OR do this:

<div id="table">
            <div class="tr">
                <div class="a"><a href="#">a</a></div>
                <div class="b"><a href="#">bbbbbbbbbb</a></div>

<!-- and so on -->
            <div style="clear:both"></div>
            </div><!-- end of row -->
    </div>
0

精彩评论

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