Reduce Onpage Style Padding In Top Menu

Menu links have an onpage padding like this:

    <span class="down bx-def-padding-sec-leftright" style="padding: 0px 25px;">Home</span>


So I can manipultae the padding in the css files all day long, but the onpage style is a throwing a monkey wrench in things.  Obviously this corresponds to this part in the bxbasemenu file:

    <span class="down bx-def-padding-sec-leftright" {$sBoldStyle}>{$sPictureRep}{$sText}</span>


The problem is I have no idea how to manipulate it.  I can find it sure....but where do I cahnge how much padding it actually applies?  As that number seems to be dynamic, based on a  few factors. 


Please let me know!

Quote · 19 Mar 2015

Yes, I find those frustrating at times as well.  The best way to find the code is to use a programme that will allow you to search through files for particular keywords.  I think NotePad++ might be one; I use PsPad but PsPad is only for windows.

Geeks, making the world a better place
Quote · 19 Mar 2015

I just dont know what to do with the {$sBoldStyle} variable.  Too bad I'm sooo bad with php. 

Quote · 19 Mar 2015

 

I just dont know what to do with the {$sBoldStyle} variable.  Too bad I'm sooo bad with php. 

You will use a search to find where the $sBoldStyle variable is being assigned its value.  Once you find that location, in a php or javascript function, then you can change how it is being calculated.




Geeks, making the world a better place
Quote · 19 Mar 2015

By the way, that is inline styling.

Geeks, making the world a better place
Quote · 19 Mar 2015

Actually, that is not what is generating that padding.

 

$sBoldStyle = ($isBold) ? 'style="font-weight:bold;"' : '';

 

What that is doing is basically stating that if it is bold, add to the code style="font-weight:bold;" else don't add it.

Geeks, making the world a better place
Quote · 19 Mar 2015

hmmm.  I wondered about that.  Where's good old Deano? 

Quote · 19 Mar 2015

 

Where's good old Deano?

Hey, I am right here you know?  Yes, Deano is much more experience with Dolphin, he has been working with the platform for many years now.  But gee whiz, I did help.  The idea was not to just hand you the answer but to help you with the approach to solving the issue so you can learn.

Geeks, making the world a better place
Quote · 19 Mar 2015

I have a basic Dolphin install; useful for many purposes, and I am not seeing that inline style added to my menu and searching the code is not turning it up.  Are you using a custom template?

Geeks, making the world a better place
Quote · 19 Mar 2015

I am not finding it in code either. In fact, my menu links don't have any style at all set in code. Also note that the padding you are seeing in that inline style is not even dolphins normal default for the included templates. So i suspect you are running a custom template.

However you should still be able to override it in the css file by using !important after the padding line.

Example.

.bx-def-padding-sec-leftright {
    padding-left: 10px !important;
    padding-right: 10px !important;
}



However as GG pointed out. A inline style set in code does not appear to be there. So if your running a custom template then it could be getting set in a custom BxTemplMenu.php in the templates script folder.

https://www.deanbassett.com
Quote · 19 Mar 2015

Right.  I am using friends-community for the template, heavily customized.  So I guess that's the end of that then perhaps?  Unless one of you guys use it...

Geek-Girl - Thanks for the clarification on the bold variable; I'm just not looking to start a php journey here..Ive tried many times...dunno if i have the mind for it, cuz it doesn't come naturally. So I need it served up on a silver platter. 

Deano - thanks for the input. Please let me know if you have more.

 

 

Quote · 19 Mar 2015

 

Right.  I am using friends-community for the template, heavily customized.  So I guess that's the end of that then perhaps?  Unless one of you guys use it...

Geek-Girl - Thanks for the clarification on the bold variable; I'm just not looking to start a php journey here..Ive tried many times...dunno if i have the mind for it, cuz it doesn't come naturally. So I need it served up on a silver platter. 

Deano - thanks for the input. Please let me know if you have more.

 

 

 Did you miss this line from Deano's response?

So if your running a custom template then it could be getting set in a custom BxTemplMenu.php in the templates script folder.


In case you don't follow that, Deano was telling you to look in the directory for the custom template (/scripts) to see if they included a custom BxTemplMenu.php file.  If so, then you can look to see how they are calculating the style or you can even edit the line and remove it.

Geeks, making the world a better place
Quote · 19 Mar 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.