Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 29th, 2008, 04:43 PM
pradeepjain's Avatar
Familiar Sight
 
Join Date: Jul 2007
Location: India
Age: 24
Posts: 244
Default 3 column structure

Hii guys,
I am working to make a 3 column structure say left-column,center content column,right-column.i am able to do it ,but when there is nothing on the left -column the center content column must start from left hand side and take up whole width of left and center and similarly when there is no right-column,the center content column must take up whole width of center and right column,how to achieve this.

Thanks,
Pradeep
Reply
  #2  
Old August 29th, 2008, 07:44 PM
David Laakso's Avatar
Expert
 
Join Date: Aug 2008
Location: US
Posts: 302
Default

My off-the -wall guess is you need three layouts. A 3-col layout as described, a 2-col layout with a narrow sidebar on the left, and a 2-col layout with a narrow sidebar on the right. Easy enough if it's a static site-- different page for each layout.

If it is an "if situation" where the amount of content, and which layout is appropriate, are unknowns then you're probably after a programming solution rather than CSS solution?
Reply
  #3  
Old September 4th, 2008, 07:33 AM
pradeepjain's Avatar
Familiar Sight
 
Join Date: Jul 2007
Location: India
Age: 24
Posts: 244
Default

Quote:
Originally Posted by David Laakso
My off-the -wall guess is you need three layouts. A 3-col layout as described, a 2-col layout with a narrow sidebar on the left, and a 2-col layout with a narrow sidebar on the right. Easy enough if it's a static site-- different page for each layout.

If it is an "if situation" where the amount of content, and which layout is appropriate, are unknowns then you're probably after a programming solution rather than CSS solution?

hey i did the coding for the 3 column layout as u said..its working fine in firefox but not in IE i.e the wisth of content is not getting properly ..plzz can u check my code

This is the 3 column layout i am using http://www.cssplay.co.uk/layouts/3cols.html

and in the html the work around


[PHP] <?php if ($right);else echo "<style type=\"text/css\" media=\"all\">#center {margin-right:0;} #container{border-right:0px;}#inner { margin-right:0px;} *html #center {margin-right:0;} *html #container{border-right:0px;} *html #inner { margin-right:0px;} </style>"; ?>
<?php if ($left);else echo "<style type=\"text/css\" media=\"all\">#center {margin-left:0;} #container{border-left:0px;}#inner { margin-left:0px;} *html #center {margin-left:0;} *html #container{border-left:0px;} *html #inner { margin-left:0px;} </style>"; ?>
<?php if ($right);elseif($left);else echo "<style type=\"text/css\" media=\"all\">#center {margin-left:0;margin-right:0;} #container{border-left:0px;border-right:0px;}#inner { margin-left:0px;margin-right:0px;} *html #center {margin-left:0;margin-right:0;} *html #container{border-left:0px;border-right:0px;} *html #inner { margin-left:0px;margin-right:0px;}</style>"; ?>
[/PHP]
Reply
  #4  
Old September 4th, 2008, 11:07 AM
David Laakso's Avatar
Expert
 
Join Date: Aug 2008
Location: US
Posts: 302
Default

Insufficient information to resolve the problem. Put your page on a public server and provide a clickable link to it in your post to the forum. Or use this layout layout gala number 14
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles