1

I have a 4 column layout with a standard header and footer. Its something like this

<div id="header"></div>
<div id="leftnav"></div>
<div id="maincontent"></div>
<div id="nextcontent"></div>
<div id="addtionalinfo"></div>
<div id="footer"></div>

Something like this http://jsfiddle.net/gaby/mBuf9/

But when there is no content/data in the center i want the right most div to span and take up the entire content space. And similarly if there is no content in the left most div i want the maincontent to span the remaining space. is there a way to do it?

4

1 に答える 1

0

次のようなものを試すことができます。

コンテンツのフィドルは次のとおりです。

http://jsfiddle.net/mBuf9/27/

そして、コンテンツのない同じフィドル:

http://jsfiddle.net/mBuf9/28/

主な変更点は、div が a に配置され、tablecss に小さな変更が加えられたことです。

お役に立てれば...

于 2013-04-08T07:52:46.200 に答える