Mutiple inheritance question

User 2822125 Photo


Registered User
17 posts

An element inherits from two classes A and B. A defines property x as red while class B defines the same property x as blue. What is the property-value of the new element if it does not redefine x (eg background color of a container) - that from A or B ? thanks, Oliver
User 187934 Photo


Senior Advisor
20,271 posts

I do believe the class order only matters in the actual css not the html.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 122279 Photo


Senior Advisor
14,653 posts
Online Now

If you have the css like this:
.a {color: red;}
.b {color: blue;}

and in your html :
<h1 class="b a">This is a blue header</h1>

It is the sequence in the css file that matters, not the sequence in the html file.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2822125 Photo


Registered User
17 posts

So .... what does that mean for RSD ? The class I define first is the one used for the property, eg it will be red in the example above ? Thanks, Oliver
User 122279 Photo


Senior Advisor
14,653 posts
Online Now

No, the class you define last will be the one used. Copy the code above and test it in a web editor, then you will see. Unfortunately I don't know how to do that in RSD. Someone else will chime in, for sure.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2699991 Photo


Registered User
5,403 posts
Online Now

like this in RSD

make any element the style you want font size position etc, give it a class name (e.g blue-header)

create same element in different place on page, give it same class name as first one (blue-header) it will adopt all styling position etc, click in classes box after class name blue-header give it second class (red-header) change colour to red change anything after that up to you.
Attachments:
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://rsd-tutorialscom.coffeecup.com/index.html
User 188640 Photo


Registered User
895 posts

Why not use the class for styling, position etc. and use an ID for each different color?
A Rose is Just a Weed in a Corn Patch!
User 122279 Photo


Senior Advisor
14,653 posts
Online Now

Of course, if that paricular ID is needed only once on each page...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.