PDA

View Full Version : CSS select style


KatieG
03-13-2014, 09:46 PM
Can you select a style via an external css?

tbworld
03-14-2014, 02:16 AM
I am not sure exactly what you are trying to do, maybe this will help you clarify your question. :)

A vbulletin style consists of HTML for structure and CSS for visual presentation. You will find them in the ACP (admincp) templates section. Each displayed page on vBulletin might use several templates and several CSS files. The vb style manager allows you to have a different set of HTML templates and CSS files (stored as templates) for each style you create. It uses a hierarchical system so that it knows to use the parent style if you have not altered a particular HTML template or CSS template within your custom style.

That being said, there is no reason you cannot alter areas of your board by overlaying CSS from an external file, this is a common practice. One board that I worked on we replaced all internal CSS (templates) with a single external CSS file, so we could use LESS (a css compiler). It was an interesting project, but the way vbulletin handles their CSS turned out to be a more efficient method.

KatieG
03-14-2014, 11:07 AM
Ok thanks for the reply, but how would I call style id: 7 for example, in css file

tbworld
03-14-2014, 11:48 AM
Ok thanks for the reply, but how would I call style id: 7 for example, in css file

Are you asking how to switch to style:7, by not using the select box in the footer? Remember a style is more then CSS, that is what I was trying to explain to you.

KatieG
03-14-2014, 12:20 PM
Are you asking how to switch to style:7, by not using the select box in the footer? Remember a style is more then CSS, that is what I was trying to explain to you.

Yes exactly what I want to do I have the styles done I just want to select them via css script

tbworld
03-14-2014, 01:38 PM
To change to a different style when calling a new vbulletin page use a URL query, just append "?styleid=7" where '7' is the ID of your style. Or add a similar link to a menu. There is no method to change the style ID from CSS alone, unless you are just changing the presentation (CSS), not the HTML.

Example:

/forum.php?styleid=7