Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET CSS jQuery VB.NET
Hey guys, we have recently been updating our application, we added some jquery and some new css styles. The wierd thing that is happening is that all the images are getting set really small for some reason. I can't find anywhere in the newly added code that is doing this, there's no refrence to images in these files but they are obviously the issue. If I set the sizes in a new css file the are fine. There are 100's of pictures throughout the application so this is not a practical solution, if anyone can help it will be very much apreciated, cheers guys.
Posted 4-Oct-12 0:20am
frostcox2.3K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This problem may be caused by CSS Cascade. Means it can easily happen that you have same class(or ID) being reset some where on the same CSS file or in InLine CSS on html page.
 
Also two CSS files that you are linking to a page can have same class name. If this is the case then last file will reset the previous style on any element. Try changing the order of the CSS files and check the result.
 
You can check the applied css on any element in the page using FireBug in firefox or in Google Chrome just right click and click on view element to check the CSS.
 
I am sure this way you can get your mistake and fix that.
 
Thanks and please reply if this helps you.
  Permalink  
Comments
Mickt1985 at 23-Oct-12 3:44am
   
Hey thanks for your reply, I have checked the files and there are no duplicate class names in the CSS files. Our application can only be ran on IE so I cannot use Firebug. This is a very strange one. Any more ideas? Thanks very much.
Mickt1985 at 9-Nov-12 4:53am
   
Hey sorry for not accepting your solution sooner, you were right, it turns out that one of our developers had hardcoded the image tag values so they were getting overwritten thank you so much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 DamithSL 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 20 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100