开发者

create flexible layout for width & height

开发者 https://www.devze.com 2023-03-05 00:07 出处:网络
hopefully you guys can help me. i facing some css layout problem. i want 开发者_如何学Cthe layout have same effect of auto-expand width and height as table with using div.

hopefully you guys can help me. i facing some css layout problem. i want 开发者_如何学Cthe layout have same effect of auto-expand width and height as table with using div. the effect i want is same as below example. layout with the width and height is dynamic and the content inside all at same horizontal line.

<table>
    <tr>
        <th>ipsum dolor sit amet</th>
        <td>
            <ul>
                <li>apple</li>
                <li>orange</li>
                <li>mango</li>
            </ul>
        </td>
    </tr>
    <tr>
        <th>ipsum</th>
        <td>
           <ul>
                <li>apple</li>
                <li>orange</li>
                <li>mango</li>
            </ul>
         </td>
    </tr>
</table>

is it possible to do it with only CSS? thanks for help if you could give some hints...


I recommend you to use DIV instead of table, table is not enough flexible and you will face problem when you test your HTML page on different browsers.

0

精彩评论

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