vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   css class problems on vb4 custom page (https://vborg.vbsupport.ru/showthread.php?t=230464)

nirvana43 12-18-2009 09:53 AM

css class problems on vb4 custom page
 
I'm trying to use predefined css classes from vbulletin on my custom page.
However its not showing me expected output (data in predefined class).
It just displays simple text output with no style.
My template under main style contains following code :
Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle}</title>
    {vb:raw headinclude}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
       
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
   
    <h2 class="blockhead">MY TEST PAGE</h2>
    <div class="blockbody">
      <div class="blockrow">


<table class="tborder" align="center">
<tr><td>My Test Data</td></tr></table>

<p class="forumdescription">My Test Description</p>


      </div>
    </div>
    {vb:raw footer}
  </body>
</html>

Above template gives me following output with no styles :
Quote:

My Test Data
My Test Description

Lynne 12-18-2009 02:06 PM

Are you doing anything to include the correct css templates in your page? Which css templates are you wanting to include?

nirvana43 12-19-2009 12:25 AM

Quote:

Originally Posted by Lynne (Post 1932935)
Are you doing anything to include the correct css templates in your page? Which css templates are you wanting to include?

I haven't created any css of my own.. i'm willing to include vbulletin's default style css...
Another thing is, whenever i switch to different style, it should automatically include that style's default css template..
I mean just like vbulletin 3.8 and below versions used to do. :)

for e.g. I'm willing to use "tborder", "tcat" etc. css classes which always comes with default css of any style.

Lynne 12-19-2009 01:20 AM

What I'm saying is that you are using classes like blockhead and blockbody, which is fine, except it isn't going to do any styling unless you define those classes. You can find where vbulletin defines them and include the stylesheet in your mod, or you can define them yourself in the head of your template.

nirvana43 12-19-2009 02:06 AM

Thanks for your reply Lynne,
I can't find where vbulletin defines blockhead and blockbody classes also... i mean in which css template..
And i'm trying to catch "tborder", "tcat" css classes from vbulletin's main CSS (The one we reach from AdminCp->Styles & Templates->Style Manager->Main CSS) but i cant find which css i'm suppose to include.. (or do i even have to include one manually for those classes)

Main CSS contains all the classes i'm willing to use in my custom template.

Lynne 12-19-2009 02:48 AM

Do a Search in Templates for "blockhead" or "blockbody" and you should find them (probably in vbulletin.css). As for tborder and tcat, those are from vb3. They are not in vB4.

You say Main CSS contains all the classes you are willing to use, however, none of the class in Main CSS are in vB4. You are going to have to create your own css is my guess.

nirvana43 12-19-2009 03:55 AM

1 Attachment(s)
I just found "blockbody" and "blockhead". They are :
Code:

<link rel="stylesheet" type="text/css" href="css.php?styleid=1&amp;langid=1&amp;d=1261137425&amp;td=ltr&amp;sheet=vbulletin.css,popupmenu.css,vbulletin-chrome.css,components.css,vbulletin-formcontrols.css" />
Please check attached image. class "tborder" and "tcat" does exists in Main CSS.
May i please know how do i use those classes? or at least syntax to include that css. :)

Lynne 12-19-2009 03:52 PM

Sure, it was in vB3, but it isn't in vB4. It says right at the top of that page:
Quote:

Obsolute - This CSS file is obsolete and is available here for reference purposes only.

nirvana43 12-20-2009 11:37 AM

Thank you Lynne for your time.
Finally i had to design my own css template for this issue.
Thank you again.

P.S. By any chance if you know any such inbuilt table classes (like tborder, thead, tcat etc.) then it will be very huge favor. :p

Lynne 12-20-2009 04:59 PM

You can grab all the old stuff from an old .css file, like this from a default css file on my 3.8 site:
Code:

.tborder
{
        background: #D1D1E1;
        color: #000000;
        border: 1px solid #0B198C;
}
.tcat
{
        background: #869BBF url(../../images/gradients/gradient_tcat.gif) repeat-x top left;
        color: #FFFFFF;
        font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.tcat a:link, .tcat_alink
{
        color: #ffffff;
        text-decoration: none;
}
.tcat a:visited, .tcat_avisited
{
        color: #ffffff;
        text-decoration: none;
}
.tcat a:hover, .tcat a:active, .tcat_ahover
{
        color: #FFFF66;
        text-decoration: underline;
}
etc



All times are GMT. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01212 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete