tags:

views:

63

answers:

1

I have a web application made in ASP.Net. Well, I have a few jquery server controls I made. Well, I just now started to bother with getting a "proper" jquery running with a theme and everything. So I replaced my old default jquery theme with a custom one and such and now everything is completely different.

From firebug it says that everything I assign just about is getting reset by .ui-helper-reset inside of jquery. How do I prevent this from happening? I would like to be able to set like font-size and such as the <body> level and not have to worry about it for each individual element, but it seems to reset the font size to something much larger than I use. the computed font-height is 17px!

I'm not understanding why it would do a CSS reset on each individual element that I add with jquery...

Edit: Ok, I just figured out some silly mistake for why my site "was" working. Well, I didn't include the theme's style sheet in the page. Now I have it included and thus I have the problems. But my problem still stands. I don't understand why the CSS Reset is happening on each element.

A: 

Just a wild guess ... How about applying your css AFTER it has been reset with jquery? Perhaps with:

$(document).ready(function() {  
    var mycss = document.createElement("link");
    $(mycss).attr("rel", "stylesheet").attr("type", "text/css").attr("href", 'your-css-filename');
});

If $(document).ready is still early, you can put the code inside a function and call it with setTimeout().

Majid
My problem with that is that I now would have a lot of lines of code to change. I would prefer to not have to touch every control made in my website.
Earlz
Actually, I'm not even seeing where the font size is getting huge in Firebug. All it shows is font-sizes of 100% and 1.1-1.0em.
Earlz
I fail to see why you'd have to change 'a lot of lines of code'. To follow the approach I have suggested all you need to do is add the four lines of code to your page and let it pull your css (hopefully) after the properties have been reset. Perhaps it could help if you revealed the url to your page ... but that is up to you of course.
Majid