The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How push css of template to that use by widget?
i want create a widget and put a picture in it
i read forum an i see that i must create a template like this : PHP Code:
but i see that template use default vbulletin css. Now: i want push css of template to this widget that i can customize only this widget in other hand i want push below item to my created template(i think i must use complete html code but i don't know what i must write it that contain style variable on it) PHP Code:
what is the best way that i can do it easily i must say that i see blow links but i want easy way that i can do this. [HOW TO - vB4] Rendering templates and registering variables - a short guide [HOW-TO vB4] Create a Widget using Plugins and Templates and see this beautiful guide from kh99 Quote:
|
#2
|
|||
|
|||
Are you asking how to create CSS so that it will only apply to that specific widget?
|
#3
|
||||
|
||||
Quote:
for example i want when create template i use PHP Code:
|
#4
|
||||
|
||||
Then you will either need to style your template inline, ie:
<div style="background: red;">... Or you will need to give the template divs their own class and then write css for it, ie: <div class="myown1"> then in additional.css: div.myown1 {background: red;} |
2 благодарности(ей) от: | ||
fariborz khan, tbworld |
#5
|
||||
|
||||
thanks Lynne
i use your second advise and it work perfectly and i create this now how put another to white area so in one column of grid i can use 2 widget in one row |
#6
|
||||
|
||||
thanks lynne i do this
|
#7
|
|||
|
|||
I have been working on extending the "widget_id" to the CMS widget, preview, article templates. This would allow us to target an individual view or widget template, without having to modify the actual template. You could then change the "relative" look via CSS on an individual basis -- obviously it doesn't change the html. It would be possible, now that we have a "widget_id" to change the HTML via JavaScript dynamically.
For example in CMS templates: Code:
<div id="cms_wrapper_{vb:var widget_id}"> normal widget code here... </div> Then in your additional CSS, taken from @Lynne's post, in your CSS: Code:
div.cms_wrapper_12 {background: red;} |
#8
|
||||
|
||||
thanks for your attention
I omitted h3 code in this widget because I like use it as link to advertisement or where I want like Home,Forum, or another and create a metro like template. thanks again |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|