开发者

What's the best way to create "vertical rules" in CSS, and where can I read more about it?

开发者 https://www.devze.com 2023-04-10 05:27 出处:网络
I have a main content region in the center of my page which is 660px wide.I want to separate it into two 330px-wide divs.What\'s the best way to go about this?Should I be using px?Do you have any plac

I have a main content region in the center of my page which is 660px wide. I want to separate it into two 330px-wide divs. What's the best way to go about this? Should I be using px? Do you have any place that I can read more about a good approach or t开发者_如何学Cwo?


put two divs inside of your center div, float one to the left and one to the right. Clear your floats (http://www.quirksmode.org/css/clearing.html) by adding 'overflow:hidden' to the container.

This will effectively split your column into two. You can specific the dimensions of the interior divs in px, or %, whichever you prefer.

Here is a working example: http://tinkerbin.com/MGjJBDS4

0

精彩评论

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