Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Multiple CSS docs in one page?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32958
    mikelegacy
    Member

    I was wondering if i referenced two CSS documents on one page, if they would combat with each other. Say for instance, i am using a Lightbox, which comes with it’s own CSS document, and a jQuery scroller, which has it’s proprietary CSS file as well, if i referenced both on one page, would they fight each other? Example below:



    Home


    Also, if I used those style sheets, and also used unreferenced markup, such as below, would it create an even bigger problem:



    Home



    If this would be a problem, then the only obvious solution would be to combine all the CSS into one document and change all the tags in which each sheet is referenced. I would rather not do this if it’s at all possible.

    Anyone who can tell me if this would be a problem, it would be much appreciated.

    #74584
    mshort1985
    Member

    all that will happen is, if there are is a conflict in styles the style sheet that is referenced last in your page will take priority. same as if you had 2 conflicting styles in one CSS document, the style that was set last would take priority.

    in your example, the lightbox stylesheet will override any styles already set in the mailhu.sfm.css stylesheet.

    #74576
    mikelegacy
    Member

    Cool thanks, i was thinking along those same lines. I’m pretty new to all of the JS and jQuery stuff, so using multiple CSS docs is still kind of foreign to me. Thanks for the info man, ill just have to make sure that the sheets have different tags in the CSS, and i’ll change some of the tags around if necessary, so they don’t conflict.

    Again, thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.