PDA

View Full Version : Expanding the Right Column


devanium
04-15-2008, 03:41 AM
I am trying to expand the right column on the default template, but just on the articles page. I created a new CSS name for the appropriate boxes:

#layout_default div#dynamic_box_right2 {width: 310px;}
#layout_default div#dynamic_box_left2 {width: 160px;}
#layout_default div#dynamic_box_center2 {width: 520px;}

The #content is still the 990px too.

However, the right column ends up just dropping down under the center box. Are there any other files that I need to modify for this?

Micha
04-15-2008, 08:38 AM
Ok, first, I think that this is wrong approach on how to accomplish this.

If you're going with dynamic_box_right2, dynamic_box_left2 and dynamic_box_center2, than you need to add also formating above it:

#dynamic_box_left, dynamic_box_left2 {
margin: 0;
float: left;
}

#dynamic_box_center, dynamic_box_center2 {
float: left;
}

#dynamic_box_right, dynamic_box_right2 {
margin: 0;
float: right;
}

And there are probably numerous classes to change in style.css in order to have the right column look good.

No in my opinion, better way to get this right is to write something like this in your layout-default.css:

#layout_default_2 div#dynamic_box_right {width: 310px;}
#layout_default_2 div#dynamic_box_left {width: 160px;}
#layout_default_2 div#dynamic_box_center {width: 520px;}

Now go to your article page, and change body ID to layout_default_2:
line 7:
<body id="layout_default_2">

That way, Id's of your columns stays the same and you don't have to worry about changing styles or anything else to get same look of your site.

I have tested this in FF, IE 6, 7, Opera and Safari, and it looks ok in all of them, right column is in her place :)

Hope this helps :)

devanium
04-15-2008, 04:37 PM
Thanks for the reply!

I tried this and it worked in Firefox, but it still pushed everything down in IE7. Were you able to get it working in both? I made sure the numbers all added up to the same amount as originally, so I don't know what the problem is...

Any ideas?

Micha
04-15-2008, 04:51 PM
Yep, just tested it in IE7 again.
It looks ok.

Do you have perhaps any banner inside that exceeds width of your right column?
This could be the case here.

devanium
04-15-2008, 05:18 PM
Thanks for the help!

Here's what I have in the right box:


<div id="box_right_holder">
<vte:include file="{VIVVO_TEMPLATE_DIR}box/article_tools.tpl" />
<div id="article_tags">
<vte:include file="{VIVVO_TEMPLATE_DIR}box/article_tags.tpl" />
</div>
<vte:include file="{VIVVO_TEMPLATE_DIR}box/article_vote.tpl" />
<vte:include file="{VIVVO_TEMPLATE_DIR}box/related_news.tpl" />
</div>


And I'm using the only layout_css modification above.

And it's weird because it only happens in IE7, but looks like it should in FF. I even tried reverting everything and it still did the same thing. Were you using the same sizes that I used above? Any other ideas?

northlandadv
04-15-2008, 08:51 PM
I has to be something in the center or left column which is pushing the right column down the page. Check all the images, etc, in the left and center to make sure they don't exceed the combined total of the left/center.

I've had this happen as well when inserting a large main/banner image in the center column (home page.) It ONLY happened in IE7 as well. It only takes one extra pixel to do it :)

devanium
04-15-2008, 09:27 PM
I has to be something in the center or left column which is pushing the right column down the page. Check all the images, etc, in the left and center to make sure they don't exceed the combined total of the left/center.

I've had this happen as well when inserting a large main/banner image in the center column (home page.) It ONLY happened in IE7 as well. It only takes one extra pixel to do it :)

Yes, this was it. I ended up reverting the entire installation back and then going through and re-adding changes I made one-by-one. I found out it was an ad unit that I had in the center column that was messing stuff up for some reason.

Thanks for the help everyone!