| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
css in tpl file | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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,
__________________
Version 4.0.18 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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>
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() 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
__________________
Version 4.0.18 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() 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
__________________
Version 4.0.18 |
|||||||
#6
|
|||||||
|
|||||||
![]() 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">
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#7
|
|||||||
|
|||||||
![]() Quote:
Here end of my welcome.tpl file: </table> </div> Any ideas ? regards,
__________________
Version 4.0.18 |
|||||||
#8
|
|||||||
|
|||||||
![]() Quote:
Sorry for misunderstunding. It works. Thanks a lot - You are guru.
__________________
Version 4.0.18 |
|||||||
#9
|
|||||||
|
|||||||
![]() Grab yourself a good CSS book, you are gonna need it
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#10
|
|||||||
|
|||||||
![]() 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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
|
|||
X-Cart forums © 2001-2020
|