ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Inline CSS within a template

May 27, 2011 12:26pm

Subscribe [3]
  • #1 / May 27, 2011 12:26pm

    imaginesurf

    19 posts

    When one chooses “webpage” as the template type, does this entirely preclude ANY inline CSS? That would seem extreme.

    I was looking to alter a single CSS property (dynamically, based on the current page) but it’s giving me a javascript eval()...?...error.

    Is there some method—beyond endless embeds and snippets—of just including a line of CSS here and there as needed?

  • #2 / May 27, 2011 12:49pm

    It’s likely an issue with the curly brackets in your JS freaking out ExpressionEngine, not the CSS it’s attempting to alter.  Inline CSS is completely fine.

    Please post the code from your template and someone will be able to troubleshoot it more accurately.

  • #3 / May 27, 2011 1:14pm

    imaginesurf

    19 posts

    It was indeed a missing curly brace! (there was no JS code…but was getting a JS error so I was confused)

    Sorry for this novice mistake…I’m having to get used to using the curly brace key!

  • #4 / May 27, 2011 2:24pm

    I’m glad it was an easy fix.

  • #5 / May 27, 2011 6:26pm

    Sue Crocker

    26054 posts

    Thanks for the assist, PEC.

    imagesurf - If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases