Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting CSS inside JScript , in diferent skins, for ProBoards Forums

Status
Not open for further replies.

triquetra

Technical User
Dec 15, 2006
1
MZ
Hello.
I am new here.
And I have a forum hosted by proboards.

ProBoards has a feature to allow members to choose diferent skins (forum layouts), that are created by the admins of the forums.
You can see what skin you are using.
Just go to Source Code > Find "var pb_skinid = X;"
X = number of the skin.
You, as a guest, will see "var pb_skinid = 1;"
But I only have one skin too.

They also allow us to costumize our pages with anything we would like to add to the body of the page. They have something called headers/footers option, where we can insert JS, CSS, HTML, etc, into the forum pages.

A bad thing about ProBoards, is that they do not have headers/footers for diferent skins. If we put a CSS code to make a: hover links go black, all the hover links, in all skins will go black.

Which is why some people came to a nice solution for JS for diferent skins:
Code:
<script type="text/javascript">
<!--

if(pb_skinid == 1){

// gigantic masses of code here

}else if(pb_skinid == 2){

// more gigantic masses of code

}

// -->
</script>
That way we have diferent JS for diferent skins.

But the problem is, I do not know how to do that in CSS. So, instead of having to host files, I would like to know, if is it possible to put CSS inside a Javascript code ?

I have already tried this:
Code:
<script type="text/javascript">
<!--
var thecss = 'all css in here';
document.write(thecss);
//-->
</script>
And also tried:
Code:
<script type="text/javascript">
<!--
document.write('all the css in here');
//-->
</script>
But nothing works.

Does anyone know how do I insert CSS inside JS ? :)

Thank you :)
 
My IE links have href title mouseover info that shows up to 4 to 7 lines of info on many of my links but it is cut off after the first line in Netscape 7 Browsers.

I have checked JavaScript free script sites and see pop up scripts but none seem to be able to handle multiple lines of information. For example this tek-tips site has boxes come up as mouseover links for advertisement. Can someone advise where I can get a script that can handle what I need?
 
My IE links have href title mouseover info that shows up to 4 to 7 lines of info on many of my links but it is cut off after the first line in Netscape 7 Browsers.

I have checked JavaScript free script sites and see pop up scripts but none seem to be able to handle multiple lines of information. For example this tek-tips site has boxes come up as mouseover links for advertisement. Can someone advise where I can get a script that can handle what I need?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top