Forums / General Questions / remove "width: 150px;" from <div id="categories" class="rightBoxContainer" style="wid

remove "width: 150px;" from <div id="categories" class="rightBoxContainer" style="wid

Locked

Started by jamesdavid on 3 Jun 2008, 10:17 AM · Views: 14,096

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
3 Jun 2008, 10:17 AM
#1
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

remove "width: 150px;" from <div id="categories" class="rightBoxContainer" style="wid

I’ve put my categories side box into the menu. I know theres other ways of achieving the menu i want, but im following this method through aswell as a learning exercise.

Firebug is telling me the following;

<div id="categories" class="rightBoxContainer" style="width: 150px;">

How can I remove this "width: 150px;". Its not in any style sheet so im guessing its in the php somewhere.
Thanks
James

3 Jun 2008, 10:30 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: remove "width: 150px;" from <div id="categories" class="rightBoxContainer" style="wid

Well, it's found in includes/templates/template_default/common/tpl_box_default_right.php

but the actual 150px value is set in admin - configuration - layour settings - column width - right boxes

If you want to shut off the right sideboxes altogether, there's a 'global' setting there too.

(I used the admin - tools - developers tool kit and searched for 'rightboxcontainer' to find this.)

3 Jun 2008, 10:32 AM
#3
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: remove "width: 150px;" from <div id="categories" class="rightBoxContainer" style="wid

Admin>>Configuration>>Layout Settings and the top two lines are where you can change that width:

Column Width - Left Boxes 150px
Column Width - Right Boxes 150px

Also if you don't want the side columns on at all, you can turn them off in the same section:

Column Left Status - Global
Column Right Status - Global

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

3 Jun 2008, 10:41 AM
#4
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Re: remove "width: 150px;" from <div id="categories" class="rightBoxContainer" style="wid

Thanks.

The reason I wanted this was I had to put

<div id="categoriesContent" class="sideBoxContent"> In my header. When I found the source php file that was creating the categories box and copied the content into my header file, it didnt work.

So that my menu can be fluid I dont want a width value for this div so ive changed the following;

<div class="rightBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <div class="rightBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="">

I first tried to use CSS to override the PHP but the following didn't work;
.rightBoxContainer, #categories {
width: 100%;
}

So long as this hasn't caused problems for me down the line, it seems to be working fine.

In future, would it be possible to use CSS to override the PHP so I dont have to edit the PHP code?

thanks
james