close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adjusting the Accordion Menu colors etc.

Thread began 3/29/2010 2:44 am by mick106153 | Last modified 4/13/2010 4:24 pm by Eric Mittman | 2120 views | 17 replies |

mick106153

Adjusting the Accordion Menu colors etc.

I've been trying to adjust the look of the accordion menu and have not been very successful.

Two things perplex me greatly.
First. Why do the various css rules that control this menu have to be in so many disparate locations?
I thought that by using mystyles.css - which I hadn't done before, choosing instead to modify the existing css files - it might make the process easier. Boy was I wrong.
Personal opinion here - mystyles.css is a bad idea. Does any style placed there supersede the entire rule in other css files or just append the existing rules in those other files? In either case it does lead to greater confusion.
I understand the need and wisdom for using different css files in certain conditions. It seems logical to include a separate file for Spry rules. Unless I'm seriously confused there are five css files controlling that menu if you include mystyles.css.
Second. Because of the problems I decided to give Theme-It a try. Seemed a logical choice at the time.
Boy was I wrong. I can see that Theme-It might prove itself valuable under other circumstances, here it is next to worthless.
Using Theme-It, there is no way I can actually see a display of the menu and the effects had by Theme-It. The dropdown selectors in Theme-It don't help at all in describing in a cogent manner the areas they will effect. And what good is it to know that a color is used by 50 different selectors when i may want to change the value of only one?

To sum I would say that the problem of too many files controlling the same thing is most prevalent in the case I've described here but is not limited to that alone.

Any thoughts or advice on how to move forward with styling that accordion would be appreciated.

Mick

Sign in to reply to this post

Eric Mittman

For the spry menu on the left you can adjust the color by opening the spry_custom.css file, in here look for this style:

.AccordionPanelTab {
background-color: #eeeeee;
border: 0;
border-top: solid 1px white;
padding:10px;
}


It is the background color in here that is the color you see.

The blue color that you see when you go into a category is set via JavaScript so you will not find it in any of the css files. It is located in the js code in your Main.dwt.php template near line 165, here is the exact line of code:

div.setAttribute('style',"background-color:#3375A2; color: white; border-top:0px;");


It is the background color listed here that you need to change.

The color of the text in the spry menu is inherited from the body styling. This is in the common.css file toward the top, look for the color property in here. If you want to add your own custom color for the text you can just add to the .AccordionPanelTab { style, put a color in here.

There is a thread that discusses these settings and has some more info on it here:

showthread.php?t=10430

Sign in to reply to this post

mick106153

Eric

I'd seen that response before and my question revolves around the fact that the problem runs deeper I think.
I don't think I'm in error to assume that both SpryAccordion.css and spry_custom.css control the display of the accordion panel in question.
If that is the case than how is it that since BOTH of those files contain the following rules:
.Accordion
.AccordionPanelTab
.AccordionFocused .AccordionPanelOpen .AccordionPanelTab
.AccordionPanelOpen .AccordionPanelTab
.AccordionFocused .AccordionPanelTab
.AccordionPanelTabHover
.AccordionPanelOpen .AccordionPanelTabHover
and in BOTH files the rules contain different content, I should expect them to not work at cross purposes?

Mick

Sign in to reply to this post

Eric Mittman

There may well be multiple places that the spry css is defined, this is the way that DW writes out spry code. The last post that I made though should cover the places where you need to make the updates to change the styling of that menu. Are you not getting the menu to update with the suggested css?

Sign in to reply to this post

mick106153

Eric

If what you say is true than am I not to touch any css file other than i.e. spry_custom.css and mystyles.css?
If that's the case than what are the rules?
If that's not the case than how am I to know which rule takes precedence?
As an example among many:
SpryAccordion.css - .AccordionPanelTab {background-color: #CCCCCC;}
or
spry_custom.css - .AccordionPanelTab {background-color: #000;}


Mick

Sign in to reply to this post

Eric Mittman

You should only need to make the update in the places that I have specified:

spry_custom.css

.AccordionPanelTab {
background-color: #eeeeee;
border: 0;
border-top: solid 1px white;
padding:10px;
}



Main.dwt.php template near line 165, here is the exact line of code:

div.setAttribute('style',"background-color:#3375A2; color: white; border-top:0px;");



The color of the text is inherited from the body, if you would like to explicitly define the color yourself you can do so in the .AccordionPanelTab css mentioned above like this:

spry_custom.css

.AccordionPanelTab {
background-color: #eeeeee;
border: 0;
border-top: solid 1px white;
padding:10px;
color: #555555;
}
Sign in to reply to this post

mick106153

Eric

To be clear.
I would like to do far more than simply adjusting color.
Exactly what i can't say without having a clear understanding of the parameters that control the look - in toto - of the menu.
I might want to display images or change the sizes of the individual menu items and so on.

And I would appreciate - if it is possible - an answer to the other questions asked in my previous replies.
And since I have now made changes to css files I infer from your redundant replies that I should not have touched, should I replace those files with originals?

Yours
Mick

Sign in to reply to this post

Eric Mittman

I'm not really sure what you are getting at. The css that controls the look of the menus has been mentioned here a couple of times now. Are you trying to add images or change things in this css that are not working for you? These are the rules that you should be adjusting to customize the look and feel of the side nav. Your other questions seem to all be geared toward what files and css control the look and feel of the menu so giving you the specific css file names and styles that control this should answer those questions.

Please post back if you have any specific questions that are not addressed by making use of the specified css to make edits to the look and feel. I will gladly help you with what I can but I'm not sure what you are looking for that has not been covered.

Sign in to reply to this post

mick106153

Eric

The fundamental question is - how can I tweak the accordion menu to a fare-thee-well?
Actually that's not really the question, because I know how to do that, I'm conversant with css.
The problem is that I seem to be stymied by redundant rules.

You've answered many times and in many places that all I need do is tweak the one line of code in main.dwt and the one rule in spry_custom.css.

Unless I'm sorely mistaken, that won't allow me to make the changes I would like.
Those being I don't know yet, could be anything, gradient images triggered by hover or click. Changes in size to differentiate the various states - whatever.

I came here to ask this question initially because I became aware that there were numerous css files seemingly working at odds, attempting to control the same div or class.

For example:
spry_custom.css contains the following -
.Accordion
.AccordionPanelTab
.AccordionFocused .AccordionPanelOpen .AccordionPanelTab
.AccordionPanelOpen .AccordionPanelTab
.AccordionFocused .AccordionPanelTab
.AccordionPanelTabHover
.AccordionPanelOpen .AccordionPanelTabHover

SpryAccordion.css contains the very same -
.Accordion
.AccordionPanelTab
.AccordionFocused .AccordionPanelOpen .AccordionPanelTab
.AccordionPanelOpen .AccordionPanelTab
.AccordionFocused .AccordionPanelTab
.AccordionPanelTabHover
.AccordionPanelOpen .AccordionPanelTabHover

And in both files the rules contained sometimes control the very same thing differently from one another.
Here is a specific actual case in point -
SpryAccordion.css - .AccordionPanelTab {background-color: #CCCCCC;}
spry_custom.css - .AccordionPanelTab {background-color: #000;}

I don't understand how this can not be a problem.
Please explain?

Is there some hierarchy of precedence these files adhere to?
If so, what is it and how is it determined?

Next, paraphrasing your original answer here "tweak the one line of code in main.dwt and the one rule in spry_custom.css" I inferred that I should not have touched the other css files - SpryAccordion.css being one of many that I have tweaked.
You've never answered whether this is something I should not have done or if there are any rules as to how I should approach these files to make changes.

If these files are meant to be inviolable than should they be replaced with original files?

As concise as I can be at the moment and probably not complete.

Mick

Sign in to reply to this post

Eric Mittman

The css page and rules that have been mentioned are the ones that are responsible for the side menu that you see. If you make edits to these styles you will update the css that is used.

CSS works with precedence, the last rule to be defined is the one that will be used. So if you have the same style defined in two different files it is the latter that will be used, this is one of the basics of css. This concept is discussed toward the bottom of this w3schools page on css.

css_howto.asp

To avoid confusion about the use of the other rules I made sure to specify only the ones that are relevant and resulting in the current state of the navigation. If you alter these styles and classes you will alter the look and feel of the menu.

Please post back if there is a specific styling that you are trying to add or edit that is not working out and I will gladly help you with whatever I can.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...