MyBB Community Forums

Full Version: CSS issue - new style affecting other areas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

I'm working on a new theme for my forum (using version 1.4.2) and I'm having an issue with the CSS.

I've created a new style in global.css and I have not called it on any pages, yet it shows up randomly on my pages.

I tired another route and created a new .css file, yet when I call it, it does not show up at all.

Any suggestions?
Link?
Sorry, just the forum looks like a mess.

http://www.ma240sx.net/forums/

The name of the style is "top_menu". The style has a background color assigned to it and a different color for the links.


I've called it only to a table in my header (notice the white background), yet it affects the links throughout the rest of the forum AFTER I click on them.

It's rather strange, since I've only assigned this style to one table.
You screwed up the template. Pages doesn't validate. You probably have an unclosed tag or something not properly nested.
Thank you for the reply.

I've reverted my header templates to original and I still have the same issue. :/

My CSS syntax is just fine too and I have not called the style anywhere.
Well I don't see issue now. Are you refreshing page properly? F5 should do the trick.

Can you show me a thread with the problem or an exact url?
I cleared my browsing history and I still have the same issue. Let me try to give a step-by-step of what the issue is.

I've created a new theme and with that theme a new and modified "global.css" file because I added this code to the bottom of the file.

.top_menu {	background: #fff;        color: #000;}
.top_menu a:link, a:active {	font-weight: bold;        color: #000000;        text-decoration: none;}
.top_menu a:hover, a:visited {	font-weight: bold;	color: #ff0000;        text-decoration: none;}

When I call this style to a link, there should be a black link with bold lettering and no underline. Also when that link has been visited or hovered, it will become red.

The issue at hand is that I have not called this style to any of the templates and for some reason all the links leading to a forum, thread or post and even in the footer have conformed to this style (when visited).

By default all the links without a style assigned to them should be blue (even when visited) because of this code placed in by default in global.css:

a:link {	color: #026CB1;	text-decoration: none;}
a:visited {	color: #026CB1;	text-decoration: none;}
a:hover, a:active {	color: #000;	text-decoration: underline;}

Screenshot:
http://i132.photobucket.com/albums/q7/Si.../scrn1.jpg

Now, say I click on "Chat"....by default the link should remain blue when I go back to the index page. The issue is that is doesn't do that, instead it's red which is what I defined in the "top_menu" style, but never called it.

Screenshot:
http://i132.photobucket.com/albums/q7/Si.../scrn2.jpg

Part of the source code to see that "top_menu" is not called.
<strong><a href="forumdisplay.php?fid=2">Chat</a></strong><div class="smalltext">Discussions about the 240SX 

Try the same scenario with another link such as "Tech Talk"....or even the links in the footer.

It's strange because I didn't have this issue before with 1.2.xx when I was making a new theme.

Worst case I just deal and have to rethink my design. Confused
Issue with your CSS:
.top_menu a:link, 
a:active
{
	font-weight: bold;
        color: #000000;
        text-decoration: none;
}
Above applies to a:active

.top_menu a:hover,
a:visited
{
	font-weight: bold;
	color: #ff0000;
        text-decoration: none;
}
Above code applies to a:visited

You need to change it to:
.top_menu a:hover, .top_menu a:visited { ... }
(2008-10-26, 02:40 AM)DennisTT Wrote: [ -> ]Issue with your CSS:

You need to change it to:
.top_menu a:hover, .top_menu a:visited { ... }

THANK YOU SO MUCH!! Big Grin Man I feel stupid. :|

That was my issue, good thing I saved my previous work on the header. Smile