WebSite X5Help Center

 
Juergen S.
Juergen S.
User

How to Include css-styles and css-files  en

Autor: Juergen S.
Visitado 2516, Followers 3, Compartido 0  
Tags: span,styles

I want to create span-Tags in my site to add class or id properties to the spans whcih I want to define in a css file and add that file to the Project. This means that I could have more styles within my Project than those who are a part of the Standard System. Do you have any idea how to provide that?

Publicado en
3 RESPUESTAS - 1 CORRECTO
Juergen S.
Juergen S.
User
Autor

Just to explain in detail:  Lets say on quite a lot of pages there are Prodct-names in the text of many of them. Now you want to format them all the same throughout the whole site.
What can you do? Well, the editor provides buttons to change font-name, font-size and font-color, and you can switch to bold or italic. But is this css, or is it done as html formatting?
If it's css, it's ok, but otherwise it's not the modern way of formatting. But anyway: If you want to do anything else you would have to activate html and do it the old way without css.
What is even worse is the fact, that you have to collect the attributes once and again, every single time the product-name appears, and that's a lot of work.
What I want to know is, can I use a span-Tag like <span class="productName"> Gartenspritze </span> and define the format in an css-file which I include to the project like:

.productName {
              font-size: 12pt;
              font-color: red;
              ...
}

How can I do that?
An idea would be to provide an add-button on the styles and models page on the text-tab to create more css-styles, and a combobox in the text editor to select them, but what can I do now?  8:o/

Leer más
Publicado en de Juergen S.
Incomedia
Claudio D.
Incomedia

Hello Juergen,

All the styles are defined in css files, and you can find the name of the classes used by pressing as example of Firefox CTRL+ SHIFt + I and then it will appear the developer panel so you can find easily the class names used. Once found you can go in step 1 and then open the expert tab and add the custom settings for the css file, by choosing to add code in the head section and adding the style between <style> </stile> tags.

Please feel free to write back if you need more information.

Leer más
Publicado en de Claudio D.
Juergen S.
Juergen S.
User
Autor

@ Jørgen Steffensen

English or German please! Foot in mouth

Leer más
Publicado en de Juergen S.