jamesjmann Posted February 26, 2011 Share Posted February 26, 2011 I have two templates (I use dreamweaver): 1 for the home page and 1 for everything else. I just tested my website in about 4 or 5 different browsers and now for the first time ever my css is messing up. It works on both templates in both Google Chrome and Opera, but only works on the home page template in every other browser. Anyone know of why this may be? Quote Link to comment Share on other sites More sharing options...
haku Posted February 26, 2011 Share Posted February 26, 2011 Probably something in your code. Quote Link to comment Share on other sites More sharing options...
jamesjmann Posted February 27, 2011 Author Share Posted February 27, 2011 Probably something in your code. In my css code or html code? I can't think of what the problem is. I doubt it's any php code I have, and I have all of my css files linked to both templates. It's really weird because this is the first time I've ever had this problem. Also, when my css files get too long, some of my ids and classes stop working. No idea why this is either. I've been having to make multiple css files because of this. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted February 27, 2011 Share Posted February 27, 2011 Well it could be anything but since you didn't say what exactly is being messed up we need to have visionary skills to know what is happening. I don't have those i am afraid Also, when my css files get too long, some of my ids and classes stop working. No idea why this is either. I've been having to make multiple css files because of this. I don't know what you mean with long, but if your css files get to big, you might want to think about either getting the redundancy out of your sheets, or re thinking your design. Might have a look at this: http://kilianvalkhof.com/2008/css-xhtml/maximum-number-of-supported-classes-per-element/ But if you have 2000 classes your are doing something very very wrong. Quote Link to comment Share on other sites More sharing options...
jamesjmann Posted March 14, 2011 Author Share Posted March 14, 2011 Well it could be anything but since you didn't say what exactly is being messed up we need to have visionary skills to know what is happening. I don't have those i am afraid Also, when my css files get too long, some of my ids and classes stop working. No idea why this is either. I've been having to make multiple css files because of this. I don't know what you mean with long, but if your css files get to big, you might want to think about either getting the redundancy out of your sheets, or re thinking your design. Might have a look at this: http://kilianvalkhof.com/2008/css-xhtml/maximum-number-of-supported-classes-per-element/ But if you have 2000 classes your are doing something very very wrong. No i can't say I've reached 2000 yet lol. But I do have quite a few. Maybe 50 per file and about 6 different files. each file is named based on the type of css used. theres id_1, id_2, and id_3 then there's classes_1, classes_2, default, and animations so about 7. but when i combine both class files or all three id files, some ids and classes just stop working. I've checked to ensure they're linked in the header, but that's not the problem. When i say "messed up" i mean the 2nd template's css doesn't work period. No css gets applied to my html elements in all browsers but google chrome and opera. and like i said, it's not the php code, however, i suspect now, that it may be due to all the javascripts I have in place. i've noticed it's been affecting bits of my html as well. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 15, 2011 Share Posted March 15, 2011 Well this still is guessing. Do you maybe hae it online somewhere? By using a tool like 'firebug', or 'chrome inspect' you can see where elements get their style from, and which style have been overwritten due to the cascading effect. Also it's a very bad thing to have 6 style-sheets if you expect them all to be loaded. That 6 header requests. Unless of-course it's done with conditional comments, but i have a feeling you are not using that. So maybe provide a link and say what you expect, in what browser etc. otherwise it will be pure guessing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.