![]() |
css in tpl file
Hi,
I have tried without succes, to appent/use/insert css style in welcome.tpl 1 method by: <link rel="stylesheet" type="text/css" href="prom_tab.css" media="screen"/> don't work. 2 method by <style> #prom_tab { margin: 0px auto 0px auto; padding: 0px 0px 0px 0px; width: 515px; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; } #prom_tab table { width: 510px; text-align: center; border: 1px solid #000; }........... </style> displays error at prom_tab { margin: 0px..... So, how to use custom style in tpl file ? regards, |
Re: css in tpl file
You can't do either as there is no <head> tag in welcome.tpl. Use the main stylesheet and use a <div> to call the style:
<div class="newstyle"> content </div> |
Re: css in tpl file
Quote:
I have tried with <head> with no succes. I use div, please look: <div id="prom_tab"> <table cellpadding="0" cellspacing="0"> <tr> <td class="header" colspan="6">Optimized Price Performance</td>........................ ............... </div> If I use <style> .... which format use: ? 1 #prom_tab {............... 2 .prom_tab {........ 3 <style> <!-- .................. --> </style> regards |
Re: css in tpl file
No, you aren't understanding. You can't call a stylesheet in a template, nor can you put a <head> tag in a template. There is one central stylesheet in X-Cart, you put all of your styles there, skin1.css. You then call those styles via a <div> like I showed you.
|
Re: css in tpl file
Quote:
OK. I do you sugested - added my styles to skin1_sustomer.css here some of code of skin1_sustomer.css: .prom_tab { margin: 0px auto 0px auto; padding: 0px 0px 0px 0px; width: 515px; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; } .prom_tab table { width: 510px; text-align: center; border: 1px solid #000; } .prom_tab td.top { text-align: left; padding: 3px 0px 3px 5px; background-color: #09387E; color: #FFF; font-size: 12px; } .................. and here some of my welcome.tpl file : <div id="prom_tab"> <table cellpadding="0" cellspacing="0"> <tr> <td colspan="6" class="top">Models with</td> </tr> <tr> <td class="header" colspan="6">Optimized Price Performance</td> </tr> ......... I have cleaned my templates_c directory and it don't work. regards |
Re: css in tpl file
Well if you are using a table you need to add it to the table instead of a <div>
<table cellpadding="0" cellspacing="0" class="prom_tab"> |
Re: css in tpl file
Quote:
Here end of my welcome.tpl file: </table> </div> Any ideas ? regards, |
Re: css in tpl file
Quote:
Sorry for misunderstunding. It works. Thanks a lot - You are guru. |
Re: css in tpl file
Grab yourself a good CSS book, you are gonna need it :)
|
Re: css in tpl file
Padraic,
Is it a BAD THING to have more than one style sheet? For example, certain 3rd party mods have their own style sheet - is there any reason why 2 or 3 can't live together? It works fine, but is it a bad thing? Is there a performance hit or is there something that may bite me later? Should I simply consolidate all 3 files into one mega CSS file? Thanks, Jeremy |
All times are GMT -8. The time now is 02:47 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.