SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Aug 25, 2007, 21:48 #1
- Join Date
- Aug 2007
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Preventing inheritance on specific HTML tags!?
Hi,
I give out HTML code to other website owners and they put the code into their own page.
The HTML code i give them uses inline CSS, for example:
<a href="http://www.example.com/" style="font-family: arial;">
The PROBLEM is that the HTML code with the inline styles that i give them inherits the styles in the stylesheet already on that person's site.
So, for example, if that person puts 5px of left padding on every link, my link inherits 5px of left padding to.... grrrrrrr.
Unless i specify padding-left: 0;
So i basically have to counter every known style in existence to stop my html code from inheriting THERE style sheet's styles
Is there a CSS property which i can add to my inline CSS, which tells a web browser NOT to inherit any other CSS rules?
So i just basically want some sort of property which says to the web browser "do not apply any CSS styles to this HTML tag besides the ones which are specified in the inline style already.
....if it's possible?
Do you have any solutions? Please help...
-
Aug 26, 2007, 14:48 #2
-
Aug 26, 2007, 18:15 #3
- Join Date
- Aug 2007
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok thanks. im screwed then
-
Aug 26, 2007, 19:34 #4
- Join Date
- Mar 2004
- Location
- Earth
- Posts
- 406
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well there's two ways you can handle this.
One is to relinquish some control over the visual appearance of your syndicated content - just allow it to inherit styling and leave it up to site owners to make sure it looks good.
Or you could put your content in an iframe, and just get site owners to include that, pointing to a page on your site. That's what most ad providors do.
Bookmarks