Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:28

borders on submenu, rawcss - RESOLVED


Poster: davebarnes
Dated: Wednesday September 26 2007 - 15:30:28 BST

I have a redesigned website ( http://www.attunesystems.com/ ) with a borders problem on my sub-menus.

My current code is:
Code:
with(Sub1MenuStyle=new mm_style()){
...
bordercolor="#b2b2b2";
borderstyle="solid";
borderwidth="1";
padding="5px 15px 4px 10px";
...}

which creates a gray border on all 4 sides.

The graphic artist's design calls for different borders on each side.
I tried replacing the border and padding parameters with:
Code:
//rawcss="padding:5px 15px 4px 10px; border-right:solid 1px #7c7c7c; border-bottom:solid 1px #7c7c7c; border-left:solid 1px #b2b2b2;";

but it did not work.

So, obviously I don't understand how to use rawcss.

Any help would be appreciated.
thanks,
dave

Re: borders on submenu, rawcss


Poster: John
Dated: Wednesday September 26 2007 - 22:19:37 BST

Hi Dave,

No idea if this makes a difference, but when I write shortcut CSS my border items are in a slightly different order than yours...
Code:
rawcss="padding:5px 15px 4px 10px; border-right:1px solid #7c7c7c; border-bottom:1px solid #7c7c7c; border-left:1px solid #b2b2b2;";

Re: borders on submenu, rawcss


Poster: davebarnes
Dated: Wednesday September 26 2007 - 22:57:17 BST

John,

The borders now appear, but are incorrect.
The borders are on EACH menu item and not the entire menu.
Take a look at Image
Now what?

Re: borders on submenu, rawcss


Poster: John
Dated: Thursday September 27 2007 - 20:12:04 BST

Dave,

I've asked Andy to take a look as my CSS isn't fully up to snuff.

Re: borders on submenu, rawcss


Poster: Andy
Dated: Friday October 5 2007 - 12:44:24 BST

rawcss won't work because it's for the menu item link and not the menu item container.

You can, however use offclass and declare all your value in there.

So, create some CSS rules like this:

Code:
.menuoffclass
{
border-top:0;
border-left:1px solid red;
border-bottom:1px solid yellow;
border-right:1px solid blue;
}


and then declare the classname in your menu_data.js file (in the menus style) like this:

Code:
offclass="menuoffclass"


HTH,
Andy

Re: borders on submenu, rawcss


Poster: davebarnes
Dated: Friday October 5 2007 - 14:12:11 BST

Andy,

An extremely helpful answer.

My pages contain:
Code:
<link href="/Styles/Attune_BaseStyle.css" type="text/css" rel="stylesheet">

and
Code:
<script language="JavaScript" src="/javascript/Milonic/milonic_src.js" type="text/javascript"></script>
<script language="JavaScript" src="/javascript/Milonic/mmenudom.js" type="text/javascript"></script>
<script language="JavaScript" src="/javascript/Milonic/MainMenu_data.js" type="text/javascript"></script>


My MainMenu_data.js file contains:
Code:
offclass="menuoffclass";
onclass="menuonclass";

and many attributes such as borderstyle are no longer needed.

My Attune_BaseStyle.css file contains:
Code:
/* Classes applicable to the Milonic Menu */

.menuoffclass {background-color: white; color: #004479; border-top:0px;border-right:1px solid #7c7c7c; border-bottom:1px solid #7c7c7c; border-left:1px solid #b2b2b2; text-decoration: none;}
.menuonclass {background-color: #CCCCCC; color: #812479; border-top:0px;border-right:1px solid #7c7c7c; border-bottom:1px solid #7c7c7c; border-left:1px solid #b2b2b2; text-decoration: none;}

and my menu appears the way the graphic artist intended.

,dave