| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Change Areas of the Skin Using Javascript | |
|---|---|
| Topic Started: Feb 23 2006, 11:09 AM (8,988 Views) | |
| Nicola | Feb 23 2006, 11:09 AM Post #1 |
|
.....
![]()
|
Using Javascript to change specific areas of your skin Have you ever made the perfect skin, only to find that in one area it doesn't work like it should? Then this guide could be for you. Using this simple javascript code you can change one of the CSS properties for a specific area of the site. The main problems people encounter is the tableborder in the portal, or the calendar text not fitting on the current maintitle. This simple code can change that for you, just follow the steps to found out how:
You must place that at the end of your CSS. Now for the explanation:
In the bolded area you need to put the area of the site you want to change. The tricky part is figuring out what to put in there. However the common areas are:
You can probably tell that those change the calendar, members, portal, topic viewing etc.
Basically the area you need to insert into the above javascript line is the end of the URL of the area you want to change. Once you have added the area you want to change to the code, you need to insert the CSS Class and give it the new 'instructions'. For this example I shall change the maintitle of the topic viewing:
That code would simply change the background image of the maintitle for the topic viewing. If you wanted to change the text alignment or text colour you would have to add those extra properties in. If you wish to use the javascript code more than once, you can set it out in the following way:
The bolded area is the new addition, you do not need to keep adding the javascript and CSS tags. This is simply a tidier way of organising your javascript. Using a DIV anywhere? If you are using 'div.tableborder' or some sort of 'div' code, you need to add the 'div.' in front of the CSS class. e.g
Of course it depends whether you have used it, or if the div affects your chosen page or not. This is just a note to explain why it may not work if you have used a 'div' and what to do. If you have used the div.tableborder code you need to use 'div.tableborder' in the CSS class in the javascript too for it to change. Note:
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Skinning Documentation · Next Topic » |







10:46 PM Nov 23