How to use style for page content?

About the template and stylesheet - and changing the menu
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to use style for page content?

Post by Tata » Fri Jan 27, 2017 9:35 pm

frase wrote: Das geht auch im Tiny3.
In Deutsch: "Zusammenhängender Bereich" = DIV
Dem kann man beliebige (sinnvolle) Klassen geben.
Nich gany so. Ich habe auch das versucht. Daer Effekt ist der gleiche. Ich hatte einmal <DIV></div>. Darunter ein <P></P>. Im stylesheet.css definierte ich eine Klasse div.extra mit

Code: Select all

div.extra{
    border: 2px solid red; background: green; color:  white; font-size: 2rem;
} 
Result ist, das der DIV, sowie auch der P hat alle Werte übernomen, d.h. DIV ist grün, mit weissem grossem Text und rotem Rand. Genauso ist auch der P.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: How to use style for page content?

Post by frase » Sat Jan 28, 2017 12:31 pm

Bei mir sieht das so aus.
<p> erbt nicht alles von <div>
(Firefox und Firebug)
screenshot.png
You do not have the required permissions to view the files attached to this post.

isometric
Posts: 158
Joined: Thu Jun 12, 2014 8:32 am

Re: How to use style for page content?

Post by isometric » Tue Jan 31, 2017 10:33 am

Warum machst du eine Konstruktion, in der sich <div> und <p> abwechseln?
Am einfachsten ist es doch dem <p> eine Klasse zu geben. Und unterschiedliche Bereich dann noch mal in <span>

Code: Select all

<h1>Title</h1>
<p>blablabla</p>
<p class="class1">blablabla blablabla</p>
<h4>blablablabla</h4>
und dann

Code: Select all

<h1>Title</h1>
<p class="class2">
 blablabla
     <span class="class1">blablabla blablabla</span>
</p>
<h4>blablablabla</h4>
Könnte dann so aussehen:
You do not have the required permissions to view the files attached to this post.
in diesem Sinne isometric

Post Reply