VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: DollarBill on October 11, 2012, 21:49:01 PM

Title: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: DollarBill on October 11, 2012, 21:49:01 PM
Hello all, I'm new to Virtuemart and have run into a problem I haven't been able to figure out.  The page is generating inline css that I haven't been able to get rid of or override.  I am working on formatting the product details page for this shop:  http://www.aurorajoleendesigns.com/joomla/index.php/component/virtuemart/rings/amarillo-detail?Itemid=0 (http://www.aurorajoleendesigns.com/joomla/index.php/component/virtuemart/rings/amarillo-detail?Itemid=0)

I've searched and searched again and have seen a few references to this topic but most dealt with inline css in php files that are easy to change.  What I am seeing is css that is created on the fly.   For instance, if you inspect the product description using firebug you can see that the text is formatted like so:

<p style="text-align: center;">
<span style="font-size: medium; font-family: arial,helvetica,sans-serif;">

I created a css rule to try and override the centered text but it seems the inline css takes precedence.

How do you get around it?  Thanks!
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: PRO on October 11, 2012, 21:54:46 PM
sounds like your content editor doing it

go into the product edit, and then "view source" to check
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: DollarBill on October 11, 2012, 22:04:44 PM
BINGO!!  Thank you!  I would have never thought to look there.  Now I'm going to go beat the owner's knuckles with a ruler for formatting the text that way!
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: s123k on November 08, 2012, 22:25:55 PM
I'm having the same problem, how do I fix this?

TIA
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: jenkinhill on November 08, 2012, 23:32:33 PM
beat the owner's knuckles with a ruler .............
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: s123k on November 09, 2012, 00:52:10 AM
beat the owner of what? >_>

when i try to edit the html in virtuemart product description and when I click save, it changes it back to <p class="western" style="margin-bottom: 0cm;" lang="de-DE"><span style="font-family: 'Gotham Light', serif;"><span style="font-size: small;"><span lang="en-US">
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: jenkinhill on November 09, 2012, 12:41:52 PM
Beat the owner of the site - these thing are so often user error and unrelated to VM, as with the OP.

Looks like copy & pasting from Word or similar? Or a problem with the Joomla MCE/JCE editor.
Title: Re: How to get rid of inline CSS? I'm assuming it's created by js files...
Post by: s123k on November 09, 2012, 16:49:07 PM
Ok, so it was tinyMCE that was doing that (I wonder why?). I changed the Joomla default editor to CodeMirror or none and it works fine.

Thanks