[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-10-2008, 08:07 AM   #1 (permalink)
NamePros Regular
 
tansks's Avatar
 
Join Date: Dec 2004
Location: Penang, Malaysia
Posts: 795
2,218.80 NP$ (Donate)

tansks is just really nicetansks is just really nicetansks is just really nicetansks is just really nicetansks is just really nice


Smarty questions

Hello,

Question 1:
I just download a free css template from somewhere else, but I an having problem to code it in to smarty. My problem is all div's background image that specify url in css style file not loading.

example:

in css style file
PHP Code:
#header
{
width: 922px;
height: 284px;
background-image: url(images/bg_header.jpg);
background-repeat: no-repeat;
}
in tpl file
PHP Code:
<div id="header"></div>
Anyone know how can I fix this problem. Thanks in advance.

Question 2:

Alternative ad does not load in FireFox 2, but work for IE7.

In tpl file have the following statement
PHP Code:
{include file="banner.tpl"}
In banner.tpl contain ad script, which is javascript and I have alternative ad url that also contain javascript (let say alt.htm).

Firstly, I use literal tag for banner.tpl - no problem for this.
Secondly, if I use literal tag in alt.htm then it will show the TEXT (in this case {literal}) in FireFox, but if I remove the tag then in FireFox show blank space (ad unit show in IE7).

Hope anyone can understand my questions. Thanks in advance.
__________________
Price comparison
Skincare and perfume
Search product, compare price and spec then visit store
tansks is offline  
Old 08-10-2008, 09:29 AM   #2 (permalink)
Senior Member
 
nasaboy007's Avatar
 
Join Date: Jul 2005
Location: NJ
Posts: 1,112
1,454.30 NP$ (Donate)

nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of


i think theres something with having single quotes around background-image, so make it:

background-image('images/bg_header.jpg');

and see if it works.


i don't know much about smarty but you could see if your javascript has errors - sometimes IE and FF parse it differently.
nasaboy007 is offline  
Old 08-10-2008, 06:11 PM   #3 (permalink)
NamePros Regular
 
tansks's Avatar
 
Join Date: Dec 2004
Location: Penang, Malaysia
Posts: 795
2,218.80 NP$ (Donate)

tansks is just really nicetansks is just really nicetansks is just really nicetansks is just really nicetansks is just really nice


Quote:
Originally Posted by nasaboy007
i think theres something with having single quotes around background-image, so make it:

background-image('images/bg_header.jpg');

and see if it works.


i don't know much about smarty but you could see if your javascript has errors - sometimes IE and FF parse it differently.
Thanks for you response, but the template work without any problem before I split into smarty. Anyway, rep added.

Anyone can help? Thanks.
__________________
Price comparison
Skincare and perfume
Search product, compare price and spec then visit store
tansks is offline  
Old 08-16-2008, 07:49 AM   #4 (permalink)
NamePros Regular
 
tansks's Avatar
 
Join Date: Dec 2004
Location: Penang, Malaysia
Posts: 795
2,218.80 NP$ (Donate)

tansks is just really nicetansks is just really nicetansks is just really nicetansks is just really nicetansks is just really nice


Detected the problem and fixed. Just an update for those may also having the same problem.

Question 1:
Just because I place in wrong folder

Question 2:
To solve the problem just need to include full html tag in alternative file like below.

PHP Code:
<html>
<
head>
<
title></title>
</
head>
<
body>
javascript here
</body>
</
html>
__________________
Price comparison
Skincare and perfume
Search product, compare price and spec then visit store
tansks is offline  
Old 08-16-2008, 08:31 AM   #5 (permalink)
Senior Member
 
nasaboy007's Avatar
 
Join Date: Jul 2005
Location: NJ
Posts: 1,112
1,454.30 NP$ (Donate)

nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of


lol glad you figured that stuff out. too bad we really couldn't have answered that first question at all. XD
nasaboy007 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 03:56 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85