This project is read-only.

How to Adjust the content column width in PostView vs Default

Topics: Themes
Nov 26, 2011 at 6:38 AM


I have a website that has 3 columns with a content column and two sidebars having widgets in them.

I want the "Default.aspx" page to display both sidebars like this:

But, when the user clicks on a Post and go into "Post View"

I want the left sidebar to go away and only display the right sidebar like this:

I got both to work ok,

But, the problem is

In "Post View" the content column stays the same width as with the "Default view"

How do I change this with CSS?

My goal is to give more room for the text when viewing it by itself.



Brian Davis



Nov 26, 2011 at 12:36 PM
Edited Nov 26, 2011 at 1:03 PM

Hi Brian,

Does it have to be entirely CSS?

For example in the site.master code behind (rough and very general)

if single post

        //Change CSS to suit i.e.
	colLeft.Visible = false;        
        colMiddle.Style["width"] = "new width";        
Or add/remove classes to the column elements instead of changing the properties directly and style to suit.


You can always play with the CSS, on it's own

Post lists usually have a wrapper element of some sort, but not in "Post View"

<div class="posts">
	<div class="postItem"></div>
	<div class="postItem"></div>
	<div class="postItem"></div>
Post View it's just
<div class="postItem"></div>


.postItem {

.posts .postItem {


But as you mention, doing it this way won't work, since the columns determine the structure.