[Pro] Prepend CSS selectors

I’ve created a html advert for a client that will be put on a recruitment advertising website and dynamically updated by the client.

However, the website developer has told me that the html I’ve submitted for the template isn’t correct (see message below).
Can this be done?


You should prepend any CSS selectors with “#jobHtml” (without quotes) to ensure you only target the HTML elements inside the job advert, and thus prevent custom CSS overriding global site styles.

This hasnt been done

Note: Please don’t include any textual styles (font-size, line-height, font-weight etc) in your styles, as these will filter down to the main header and ‘job actions’ bar and cause unintended layout defects.

They have done this

Just remember to prepend all CSS styles with “#jobHtml” and use classes (not IDs) to target HTML elements. For example, “#jobHtml .mainLogo { … }, #jobHtml h3 { … }” etc.

They haven’t done this

http://marketing.investigo.co.uk/template/investigo-6347-v2.html


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can create styles manually that will look like this, but you will have to do the whole thing by hand in the Edit Styles dialog. Put the entire CSS selector (the part outside of the curly-braces) in the Tag field, and put whatever you have in the Name field (which is where the class-based rules are created) into the Tag field as well, leaving the Name field entirely blank. For example, let’s say your style was set up like this:

  • Tag: h2
  • Name: myAdStyle

You would change that entirely to:

  • Tag: #jobHtml h2 .myAdStyle
  • Name [blank]

But when you do this, you will stop seeing your layout (in Freeway) – everything will become plain HTML text, because the CSS won’t actually match the final code (unless you have a box in your page that is a parent to everything and you have given it the Name/ID value of jobHtml).

You may want to consider post-processing the HTML and CSS in a text editor to make it suit the requirements. Freeway is not your friend in this regard, because it likes to determine the CSS selectors and keep everything in synch within its own universe. You could fix this in a few minutes with search-and-replace and a programmer’s text editor.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

Many thanks for your reply. I’m not sure I fully understand how to do this. If I send you the Freeway file would you do it for me (for a fee of course)? Let me know. I can PayPal you.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options