View Full Version : css in header

Nov 26th, 2006, 09:12 PM
if i have css in the head of my document is there any way to get it to stop at a certain point if i dont have access to the code of the rest of the page?

Nov 26th, 2006, 09:22 PM
can you please give some code or an example. Reading what you wrote, i wonder how you got the css in the head to begin with without having access to the rest of the page.

Nov 27th, 2006, 04:22 AM
well you see i am a member of a site where you can use html in your tag or avitar if you will and when i use css and then posted on the forums the whole board turned the colors i had set for my tag so when the mods saw it they deleted my post and my css so what i was wondering is if theres a way to stop the css befor it gets outside the tag also i have a 150 character limit and at least 51 of them are used

Nov 27th, 2006, 06:56 AM
Okay so the mods don't like that you put css in your avatar so don't you think they will just delete it again? And no there is no way to just "stop" CSS. It effects everything on the page that its on. Bottom line, don't use CSS in your avatar.

Nov 27th, 2006, 11:53 AM
Well, where it "stops" depends on how you choose the selectors. For example if you just type td {...}, of course all table cells will be styled. But if you go the myspace way and narrow the selection of table cells like this:

table table table td {...}

that will only style tds that are children of a table that is a child of another table that is a child of another table. That should work for parts and not the entire page.
But if you can use HTML then you probably can use the power of IDs and classes too. Assign an ID or a class to your avatar's HTML (e.g. <table id="myavatar">) and then specifically style the element with this ID:

#myavatar {...}

and nothing else will be changed.