Forums / Templates, Stylesheets, Page Layout / Why is my styling not taking effect?

Why is my styling not taking effect?

Views: 4,666

Results 1 to 17 of 17
19 Apr 2012, 10:53 AM
#1
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Why is my styling not taking effect?

Hello,

Zen Cart 1.3.9h

Database Patch Level: 1.3.9h

I've setup a new product, which is pulling in an iFrame. I've applied some styling to the iFrame to remove the border. But this change is not taking effect.

I suspect there is some caching going on somewhere. My configure.php has the following settings as follows:

define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/usr/local/xxx/xxxxx/xxxxxx/xxxxxxx/httpdocs/cache');

I've tried setting the SQL_CACHE_METHOD to 'none' but this did not make any difference.

I've looking at this for awhile, any help appreciated ?

Regards,
Stephen

19 Apr 2012, 11:08 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Why is my styling not taking effect?

Out-of-the-box Zen Cart doesn't do any caching that would affect the symptoms you describe.

So it's more likely that your problems are a result of not applying styling correctly, not applying it in the right file, not uploading the file to the server successfully, or you've installed addons which change the normal operation and they're interfering with things and causing unexpected results.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Apr 2012, 11:22 AM
#3
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

Thanks for the reply, I should probably clarify a bit.

I've setup a new product and in the description I pasted the following code into the editor ( Source view ):

<iframe height="510" src="http://xxxxx.xxxxxxxx.com" width="728"></iframe>

The iframe was works with no issues, but I added the following property frameborder="0", which should remove the border. But when I save my changes, they do not take effect.

I know this value is correct as I've tested in firebug, manually typing it in.

We are taking over development of this site and it is possible that there are addons which could be causing the problem.

19 Apr 2012, 11:23 AM
#4
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Why is my styling not taking effect?

It is more likely to be a browser cache problem. Did you already try to empty the cache of your web browser?
The Zen Cart cache method has nothing to do with it.

19 Apr 2012, 11:32 AM
#5
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

yes, tried that. It was the first thing I tried.

19 Apr 2012, 11:43 AM
#6
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

It doesn't look like there are any addons.

19 Apr 2012, 11:47 AM
#7
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Why is my styling not taking effect?

Okay, just asking, because a lot of people tend to forget to do just that :D

Do you have a link to the site?

What happens if you change the <iframe> to <object> ?

19 Apr 2012, 11:56 AM
#8
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

I've just changed it to <object> and saved, refreshed the web page but it still picks up <iframe>.

I can confirm my changes are being saved, when I log out and log back in again they are still there.

Link is paulsheeranjewellers.ie/jaegerlecoultre-ezp-11.htm

19 Apr 2012, 11:57 AM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Why is my styling not taking effect?

I can't speak to your exact issue, but I have iframes from Amazon on a couple of sites, and the iframe source contains the frameborder="0" element in either case - when I specify a border, or not. It looks like Amazon just changes the border color to the same as the background color when no border is required. You might try that if you don't figure this out.

19 Apr 2012, 12:12 PM
#11
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

I've just made those changes, but its still has the <iframe> tags, when I look at the source in firebug.

I don't think the problem is with the actual HTML, my changes just seem to be taking effect.

19 Apr 2012, 12:18 PM
#12
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Why is my styling not taking effect?

It just occurred to me that it looks like you are rewriting your urls to look "nice" . Is there some sort of caching happening for that, this could prevent your changes from showing? It is probably a setting somewhere in your Zencart admin

19 Apr 2012, 12:53 PM
#13
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

The rewrites are all in the .htaccess file. So I don't think that would be the problem.

19 Apr 2012, 1:02 PM
#14
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

Ok, something very strange happening. I tried to edit another product just see what would happen and sure enough the changes were reflected on the browser when I refreshed the page.

So it doesn't appear to be anything to do with caching at all.

Very strange.

19 Apr 2012, 1:14 PM
#15
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Why is my styling not taking effect?

stephenconnolly:

Ok, something very strange happening. I tried to edit another product just see what would happen and sure enough the changes were reflected on the browser when I refreshed the page.

So it doesn't appear to be anything to do with caching at all.

Very strange.

But the page we were talking about isn't a product page it is a ez-page, isn't it? (looking at its url)

19 Apr 2012, 1:27 PM
#16
stephenconnolly avatar

stephenconnolly

New Zenner

Join Date:
Apr 2012
Posts:
19
Plugin Contributions:
0

Re: Why is my styling not taking effect?

I think I know what's going on. I have some custom CSS which I want to use on this page, ( includes/templates/classic/css/page11.css ).

Based on some documentation I read, if I want to apply specific CSS to a page, the URL should look like this:

paulsheeranjewellers.ie/jaegerlecoultre-ezp-11.html

Now, if I remove this specified URL from the category settings ( * I may have mentioned in the initial post that I was trying to enter a product, its actually a category, sorry about that !) the iFrame border disappears as it should.

But the issue now is my custom CSS is not applied.

19 Apr 2012, 3:29 PM
#17
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Why is my styling not taking effect?

It does sound like your problem is with your URL rewriter not playing nicely with some stock Zen Cart functions and thus with other mods which use those. From the form of your URLs, you are not using CEON, which is widely reported to be the best at working with all ZC functions, and the cleanest and most flexible. With CEON, you would not need the -ezp-11.html cluttering up your pretty URLs. No rewriter should tack the fake .html onto the end of its product, as it does not tell the user or search engines anything useful.