Jump to content

Preventing CSS Clash


PcGeniusProductions

Recommended Posts

Hi. I have an EXTREMELY large code (a full phpBB3 template, to be exact) and have so far had great success with integrating it into my Joomla System.

 

I have come across a problem, that I have no idea how to fix, or what questions to ask. Basically, the CSS from my Joomla Template is clashing with the Forum template. Is there a way to isolate a section of code so it does not inherit 3rd-party CSS Styles?

 

If not, then is there another way to fix my problem? I am not looking for a professional job, I simply want it to work.

 

Thanks for your info.

Link to comment
Share on other sites

Try adding !important just after the css entries you want to keep.

 

ie..

 

#content {

      width: 1000px !important;

}

 

It'll make sure that that is the value to follow. Also need to counter balance any other css values the other one contains that you don't want... like margins and paddings and backgrounds and such.

Link to comment
Share on other sites

Ahh, finally a result... The suggested method "works" to a degree, but it works "too much" if you get what I mean... Instead of simply protecting its own code, it has gone and overridden my Joomla Template too.

 

This should not be a problem, it is a simple matter of CSS ID Clashes... I hope :D

 

Thanks for your help, this has gotten me back on track ;) Very much appreciated..

Link to comment
Share on other sites

If it was that easy, I would have done it straight away. My problem is, that I am visually integrating my phpBB3 Style into my Joomla Template. The CSS is clashing. The only solid fix I know of, is to manually go through dozens of files, and rename thousands of CSS Tags. This is a last resout, I am desperately searching for a more efficient and time saving way to do this.

 

Come to think of it, it would probably result in the most stable forrum than if I were to cheat and limit the CSS to only one DIV.

 

Summery Question...

 

I have a whole forum system of styles. Is there away to funnel those stylers into only one DIV? E.g., If I was to wrap the entire forum inside <div id="forum-wrap"> then tell the CSS to ONLY apply its styles to the content within that DIV, and nothing else. Is this possible? Or do I need to manually go through everything?

 

Hope this explains more.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.