PDA

View Full Version : Adjusting spacing on filter plugin


cbaisden
10-26-2005, 06:20 PM
Hey calendar peeps:

For some reason, the filter plugin seems to take up an enourmous amount of space. Take a look at my calendar:
http://symphonyblog.com/calendar/

Is there an easy way to make the filter smaller so that my legend can tuck right up against it?

ve9gra
10-26-2005, 06:57 PM
Ok, the problem isn't with the filter, but rather with your table.

You have three rows in your table, and on the middle row (where the filter is) you have two columns. So to equalize things, on your first and last rows, in the <td> tag, modify the tag so that it's like this

<td colspan="2">

That way, the row in the middle will be covered by the cells above and below.

Good luck.

cbaisden
10-26-2005, 07:14 PM
Check it again...

I put the colspan tag into each of the <td> tags, but it is still too wide. Did I change it and make the problem worse! LOL.

Thanks!

cbaisden
10-26-2005, 07:15 PM
Hey never mind! I just got it!!!

cbaisden
10-27-2005, 01:00 PM
Ok -- so I solved the problem of having absolutely no HTML skills (well partially), but I do have another related question on this topic.

Take a look: http://symphonyblog.com/calendar/

What I would like to do is apply a style sheet to the filter drop-down menu. That way instead of being the oversized default font, I could set it to a smaller Arial size 11 font. How would I go about doing this?

Brian
10-27-2005, 02:17 PM
Open the plugins/filter.php file and apply a CSS attribute to the drop-down form element.

cbaisden
10-27-2005, 03:04 PM
Here is the code for that page...why isn't it taking the class tag?

<?php
//////////////////////////////////////////////////
// DISPLAY MAIN CATEGORIES DROP-DOWN /////////////
//////////////////////////////////////////////////
/*
This plugin will display a single drop-down menu with the Main Category selections.
*/
if (!isset($epcCategories) || $epcCategories=="") exit;
$epcCat = explode("-||-",$epcCategories);
// DISCARD ARRAY KEY INFORMATION
$epcHighKeyX = explode("|",array_pop($epcCat));
// ASSIGN EACH CATEGORY WTTH SELECTIONS TO AN ARRAY
if (count($epcCat)>0) {
// RESET COUNTER
$epcCatCount = 0;
foreach ($epcCat as $epcValue) {
if ($epcValue!="") {
$epcCategoryHolder[$epcCatCount] = $epcValue;
$epcCatCount++;
}
}
}
// SHOW CATEGORY
$epcValue = $epcCategoryHolder[0];
$epcCatFull = explode("|",$epcValue);
// SET CATEGORY NAMES
$epcCatNameSet = $epcCatFull[1];
$epcCatNameSet = explode("[",$epcCatNameSet);
$epcCategoryNames[$epcCatNameSet[1]] = $epcCatNameSet[0];
// DISPLAY CATEGORY NAME
//echo $epcCatNameSet[0].": ";
// SHORTEN SELECTIONS ARRAY
array_shift($epcCatFull);
array_shift($epcCatFull);
// SORT SELECTIONS
asort($epcCatFull);
reset($epcCatFull);
// SHOW DROP DOWN FORM
?>
<link href="filter_style.css" rel="stylesheet" type="text/css">
<body class="form">
<form action="<?php echo htmlentities($_SERVER['PHP_SELF']) ?>" method="get" name="FilterForm" class="form" id="FilterForm" style="font-size:11;">
<select name="showCat" class="form" id="showCat">
<option value="">Show All</option>
<?php
// SET SELECTIONS NAMES
foreach ($epcCatFull as $key) {
$epcSelFull = explode("[",$key);
if ($epcSelFull[0]!="") {
echo "<option value=\"$epcSelFull[1]\"";
if ($_REQUEST['showCat']==$epcSelFull[1]) echo " selected";
echo ">".$epcSelFull[0]."</option>";
}
}
?>
</select>
<input type="image" name="submit" src="images/submit.gif" width="74" height="26" border="0">
</form>

Brian
10-27-2005, 03:10 PM
What are the attributes of the form CSS?

cbaisden
10-27-2005, 03:20 PM
This is what is in filter_style.css:

.form {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
line-height: 11px;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;

Brian
10-27-2005, 03:29 PM
I'm not sure where the CSS file is stored on your server, but make sure the path is correct. If you put the CSS file in the plugins directory, you'd need to add that to the path.

You may just want to put the CSS in the filter file?

cbaisden
10-27-2005, 03:34 PM
Dude -- you're good. All set. Thanks!