css/everything help

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Bewbs

css/everything help

Post by Bewbs »

what could be causing the strange colored box around the vertical menu, and why is the vertical menu pushing the content box down

http://www.bewbs.com/V2/index.php?page=test

also, any suggestions on how to make it look better under ie6
SteveG

css/everything help

Post by SteveG »

The content is being pushed down because you are using relative positioning.
Remove the top: 59px; line from the CSS and that will solve it.
The only strange colored box I could see is caused by the transparent.png

HTH

Steve
beejereeno

css/everything help

Post by beejereeno »

Thank you...this worked!
Anonymous

dhtmlmenu

Post by Anonymous »

how can i change the color of the dhtml menu? i have changed every color in the template but its still grey!!!
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

css/everything help

Post by Ted »

If you edit phplayers/layersmenu-cms.css, it will change it. We really need to move this into the default template's css...
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

css/everything help

Post by Greg »

To control the menu CSS entirely from the one CSS file I took all the css out of phplayers/layersmenu-cms.css and added it to my css templates.

phplayers/layersmenu-cms.css is just a dummy file now.

Works great!
Greg
Noobie

css/everything help

Post by Noobie »

I'm sorry that i have to reveal myself as a true Noobie...

But exactly what do i edit in phplayers/layersmenu-cms.css to change the colour of the dhtml?

I've tried to copy it & paste it on the bottom of my css template - then experimented changing all the background colour. But, alas, the dhtml still remains blue/grey!
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

css/everything help

Post by Greg »

You are half way there with copying the code into your own template.

If you don't change any of the colors in phplayers/layersmenu-cms.css then those colors over-ride the colors you put in your own css. That is why I took all the code out of phplayers/layersmenu-cms.css and saved it as a dummy file.

phplayers/layersmenu-cms.css has no code in it but is still there so phplayers menu doesn't complain about a file not found.
Greg
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

css/everything help

Post by Ted »

We NEED to come up with a better workaround for this problem. I'm not totally sure how to handle it, though. Maybe phplayers should have an option to not inlclude the css file? Maybe there should be a stylesheet hook that includes all the stuff from the css file into the css of the template? Any ideas?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

css/everything help

Post by Ted »

That's actually a really good idea. I'm just wondering if it would break the upgrade path.
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

css/everything help

Post by Greg »

Another way is to utilize the cascade Specificity rules. I put only the selectors and attributes in my css that I want to change and specify the #leftnav id selector in front of each class. eg

Code: Select all

/* phpmenu css */
#leftnav .verbar   {
   color: black;
   background-color: #edb;
}

#leftnav .subframe   {
   background-color: #edb;
}
#leftnav .item   {
    font-size: 12px;
    background-color: #53302D;
    color: #fff;
    font-weight: bold;
    border: 1px solid #000;
    margin:2px;   
}
#leftnav .separator   {
    background-color: #edb;
    border-top: 1px solid #322;
    border-bottom: 1px solid #edb;
    margin: 4px 1px 3px 1px;    /* top right bottom left */
}
#leftnav .item a   {
    color: #fff;
}
#leftnav .item a:link   {
   color: #fff;
}
#leftnav .item a:visited   {
   color: #fff;
}
#leftnav .item a:hover   {
   color: #322;
   background-color: #ffe;
}


In my template I have the menu in a div with id leftnav

Code: Select all

<div id="leftnav">
{cms_module module="phplayers" showadmin="0"}
</div>



As '#leftnav .class' is more specific than just '.class' it take precedence.

ID's always have the greatest weight when it comes to specificity.

Big John has it all explained here here

However this is probably too complicated of an approach
Greg
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

css/everything help

Post by Ted »

Yeah, but that's assuming that IE (which most people still use... why is beyond me) actually does the cascading properly. :)

I was actually thinking something along those lines as well, but instead having the phplayers module actually put the css into the same stylesheet (through stylesheet.php) BEFORE the rest of the CSS so that cascading would work. Between that, and an option to turn off the phplayers CSS completely, I think it would be flexible enough, though far from perfect.
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

css/everything help

Post by Greg »

Cascade works in IE 6, maxthon, and Moz 1.7.5 for sure. I don't have firefox, opera or any other browsers installed so have no way to test them.
Greg
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

css/everything help

Post by Greg »

OK , I installled FireFox and the cascade works correctly in it as well.
Now I am Up to date with the rest of the world. :D
Greg
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

css/everything help

Post by Ted »

Welcome. It's a nice place to be... :)
Post Reply

Return to “Developers Discussion”