Forums / Basic Configuration / Blank side box issue

Blank side box issue

Locked

Started by rob905 on 24 Dec 2007, 12:14 PM · Views: 4,308

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
24 Dec 2007, 12:14 PM
#1
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Blank side box issue

I have installed the Blank Side Box add-on and it seems to have a gap between the title bar and the content.
Is there a way to get rid of the gap? I'm using the basic config for this add-on.
The link to see what I'm talking about it https://www.robertensing.com

Thanks
Robert

24 Dec 2007, 1:13 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Blank side box issue

When I look at the XHTML being generated for this page, it reads```

<p></p>Get an instant 10% discount for opening an account. A "10% off your first purchase" coupon will be emailed to you as soon as you create a new account. Simply go to the "<a href="https://robertensing.com/index.php?main_page=login">Log In</a>" page and create a new account. ```Those empty paragraph tags at the beginning are what is causing your unwanted space. I suspect you meant to wrap the paragraph tags around the text.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

24 Dec 2007, 1:18 PM
#3
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

kuroi:

When I look at the XHTML being generated for this page, it reads```

<p></p>Get an instant 10% discount for opening an account. A "10% off your first purchase" coupon will be emailed to you as soon as you create a new account. Simply go to the "<a href="https://robertensing.com/index.php?main_page=login">Log In</a>" page and create a new account. ```Those empty paragraph tags at the beginning are what is causing your unwanted space. I suspect you meant to wrap the paragraph tags around the text.

Actually, the only paragraph tags left are the ones in the heading and the gap is still there.
All I did was follow the directions and put the text exactly where your instructions told me to put the text.
Here is the actual code as it is now:
.
.
$content .= '<p>' . Instant_10%_Discount . '</p>';
$content .= 'Get an instant 10% discount for opening an account. A "10% off your first purchase" coupon will be emailed to you as soon as you create a new account. Simply go to the "<a href="https://robertensing.com/index.php?main_page=login">Log In</a>" page and create a new account.';

$content .= '</div>';
?>

24 Dec 2007, 1:29 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Blank side box issue

The header text is actually being picked up from your language file, not from the bit of code that you have just posted.

That code is invalid. and everything between the paragraph tags is being ignored, which is why you get an empty paragraph.

Upon reflection, though it would probably be a good idea to wrap your other text in paragraph tags as although not strictly necessary, Internet Explorer prefers it and some of the bugs in version 6 are associated with text wrapped in div tags only.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Dec 2007, 12:01 AM
#5
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

kuroi:

The header text is actually being picked up from your language file, not from the bit of code that you have just posted.

That code is invalid. and everything between the paragraph tags is being ignored, which is why you get an empty paragraph.

Upon reflection, though it would probably be a good idea to wrap your other text in paragraph tags as although not strictly necessary, Internet Explorer prefers it and some of the bugs in version 6 are associated with text wrapped in div tags only.

I'm confused.
The file that has that info is located in my ../templates/MY_TEMPLATE/sideboxes/tpl_blank_sidebox.php and with or without the <p></p> tags the space is there.
In the laguage file there is a header and some text, but none of that is showing up on the site. That file is located at ../languages/english/extradefinitions/blank_sidebox_defines.php

25 Dec 2007, 1:23 AM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Blank side box issue

Unless you have changed code in the template that you're not showing us, the header for the blank sidebox is held in the constant BOX_HEADING_BLANK_SIDEBOX, which is output between header tags by tpl_blank_sidebox.php and defined in blank_sidebox_defines.php.

The line > $content .= '<p>' . Instant_10%_Discount . '</p>'; is causing most of your blank space since you have no constant defined called Instant_10%_Discount and so this is treated as NULL by PHP. To satisfy yourself that this is not the text being output, I suggest that you form it correctly i.e. > $content .= '<p>Instant_10%_Discount</p>'; and you will see that it duplicates the text in the title.

When that line is then deleted, most of the space at the top will disappear. You'll still have some, and it will be equal at the top and the bottom of the box. If you wish to eliminate it, you would add the following to your stylesheet no earlier than line 140:> #blanksideboxContent p {padding: 0 0.5em}

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Dec 2007, 2:17 AM
#7
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

kuroi:

Unless you have changed code in the template that you're not showing us, the header for the blank sidebox is held in the constant BOX_HEADING_BLANK_SIDEBOX, which is output between header tags by tpl_blank_sidebox.php and defined in blank_sidebox_defines.php.

The line is causing most of your blank space since you have no constant defined called Instant_10%_Discount and so this is treated as NULL by PHP. To satisfy yourself that this is not the text being output, I suggest that you form it correctly i.e. and you will see that it duplicates the text in the title.

Than'ts exactly what happened and showed me that the title was defined in a different file, I just happened to have the same text in two files (although one was ignored until I put in the correct codes.)
Looks like I have it figured out now, thanks

kuroi:

When that line is then deleted, most of the space at the top will disappear. You'll still have some, and it will be equal at the top and the bottom of the box. If you wish to eliminate it, you would add the following to your stylesheet no earlier than line 140:

If I decide to add this to my style sheet, what tag whould I use, "BOX_HEADING_BLANK_SIDEBOX" ?

Thanks again.

25 Dec 2007, 3:08 AM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Blank side box issue

No, BOX_HEADING_BLANK_SIDEBOX is a PHP constant, not an HTML tag.

What you would add to your stylesheet is exactly what Kuroi posted:```
#blanksideboxContent p {padding: 0 0.5em}

25 Dec 2007, 3:29 AM
#9
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

gjh42:

No, BOX_HEADING_BLANK_SIDEBOX is a PHP constant, not an HTML tag.

What you would add to your stylesheet is exactly what Kuroi posted:```
#blanksideboxContent p {padding: 0 0.5em}


I have tried:
#blanksideboxContent p {padding: 0 0.5em}

I have tried:
#blanksideboxContent p {
     padding: 0 0.5em
     }

I have tried:
#blanksideboxContent p {
     padding: 0 0.5em;
     }

I've even tried:
#blanksideboxContent p {
     padding: 0.5em;
     }

starting on line 143 and can't seem to see any difference.
( I tried following the way the stylesheet.css was layed out)
25 Dec 2007, 3:36 AM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Blank side box issue

If you have added a bunch of items early in your stylesheet, that line count will be wrong.

Try adding the code at the end of the stylesheet. Or look through your stylesheet to find where the p element is styled, and make sure your new declaration is just below that.

25 Dec 2007, 10:56 AM
#11
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Blank side box issue

The line count is correct, though Glenn's suggestion of putting the change at the end is a sensible one, as that guarantees no errors of placement.

All the things you posted would work. However, you have inserted a space before the C of Content which means that what you have added to your stylesheet is not recognized.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Dec 2007, 12:30 PM
#12
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

gjh42:

If you have added a bunch of items early in your stylesheet, that line count will be wrong.

Try adding the code at the end of the stylesheet. Or look through your stylesheet to find where the p element is styled, and make sure your new declaration is just below that.

I'm not good at coding but I think this is what you are asking:

P, ADDRESS {
padding: 0.5em;
}

this is at line 139 in my stylesheet.css

I have added the other code at the very bottom of the sheet at line 722 and still don't see a difference.

25 Dec 2007, 3:28 PM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Blank side box issue

So Kuroi was of course correct, and putting the new declaration at line 140+ will work, but only if you close up the gap before Content.

Here is what you have now:```
#blanksidebox Content p {
padding: 0 0.5em
}

25 Dec 2007, 10:38 PM
#14
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

gjh42:

So Kuroi was of course correct, and putting the new declaration at line 140+ will work, but only if you close up the gap before Content.

Here is what you have now:```
#blanksidebox Content p {
padding: 0 0.5em
}


Unfortunately it did NOT work.
I even tried to put the code in the default stylesheet.css but nothing happens, the gap remains top, middle and bottom of the box. :frusty:
25 Dec 2007, 10:45 PM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Blank side box issue

Rob905:

Unfortunately it did NOT work.That would be because unfortunately you haven't done what Glenn and I suggested and got rid of of the gap in "#blanksidebox Content". That should read "#blanksideboxContent" with no spaces.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Dec 2007, 10:48 PM
#16
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Blank side box issue

Instead of having this:

<p>Get an instant 10% discount for opening an account on www.RobertEnsing.com.</p>

Why not start with a break tag?

<br />Get an instant 10% discount for opening an account on https://www.RobertEnsing.com.

Or, since 'sideboxContent' does have a descriptor for padding, put this at the bottom of your 'stylesheet.css' file.

blanksideboxContent { padding: 0 0.5em }

kuroi, I just looked and do see "sideboxContent" as one word.

The learning is in the doing.

Potent Products

25 Dec 2007, 11:40 PM
#18
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

Website Rob:

Instead of having this:

<p>Get an instant 10% discount for opening an account on www.RobertEnsing.com.</p>

Why not start with a break tag?

<br />Get an instant 10% discount for opening an account on https://www.RobertEnsing.com.

Or, since 'sideboxContent' does have a descriptor for padding, put this at the bottom of your 'stylesheet.css' file.

blanksideboxContent { padding: 0 0.5em }

kuroi, I just looked and do see "sideboxContent" as one word.

Sorry folks, I must be an idiot but I can't get any of the suggestions to make any difference.

I have removed the space between box and Content in both style sheets and no difference. (The default stylesheet and the one in YOUR_TEMPLATE)

I also changed the tag in both files according to the last suggestion (removing the single "p" between Content and { and that didn't make any difference either.

I even tried add the ";" at the end of 0.5em like I see in the stylesheet for the other entries and that doesn't seem the help either.

Sorry folks,

Can you please tell me which file I should concentrate on, the one my YOUR_TEMPLATE css file or the default one in the css folder?

25 Dec 2007, 11:44 PM
#19
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Blank side box issue

The file that matters is includes/templates/YOUR_TEMPLATE/css/stylesheet.css

Despite all the changes that you are making, that file does not seem to have changed. The line with the unwanted space is still lurking at the bottom of the file (at least on your webserver), suggesting that you are now making changes to the wrong place, or that file isn't getting uploaded to the correct place after being changed.

Getting rid of that space is the only thing you need to do.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

26 Dec 2007, 12:13 AM
#20
rob905 avatar

rob905

Zen Follower

Join Date:
Sep 2007
Location:
Niagara Falls, Ontario
Posts:
378
Plugin Contributions:
0

Re: Blank side box issue

kuroi:

The file that matters is includes/templates/YOUR_TEMPLATE/css/stylesheet.css

Despite all the changes that you are making, that file does not seem to have changed. The line with the unwanted space is still lurking at the bottom of the file (at least on your webserver), suggesting that you are now making changes to the wrong place, or that file isn't getting uploaded to the correct place after being changed.

Getting rid of that space is the only thing you need to do.

What program can I use to view the source the way you see it as just selecting view source doesn't seem to show me the error.
That way I won't have to bug so much on Christmas day.

Thanks again for your help and patience.