Classes for text entries

User 188640 Photo


Registered User
895 posts

I really couldn't figure out a good title for this post.

I'm rebuilding a web site that was build with RSD. For this site I have scripts in the footer and have decided to put all the code in an html element. I will have to write a custom css file for the (2) different footers. This site just has to have a counter on the home page. (PITA)

So, one footer for the front page and one footer for the other 18 pages. I don't want to have to take the time to edit all the pages after export, the reason for doing an html element. And then creating a symbol.

I noticed when in edit text that the class changes to text-text-1 etc.. Why does the class change in edit mode? Shouldn't that be the class that was assigned to the text element? Or, am I missing something about text classes?



A Rose is Just a Weed in a Corn Patch!
User 122279 Photo


Senior Advisor
14,461 posts

All the elements get the class name changed if you start styling it. To begin with, they just have the element type, 'text' in your case. Then, if you don't give it a class name yourself, it gets the generic class name 'text-1' once you do some styling. The next text element will then be 'text-2', even if you style it the same way. You can try giving the body a bg-colour, or some padding, and all of a sudden it is called 'body-1'.

To avoid this generic distribution of class names, you need to give the element a class name yourself.
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 188640 Photo


Registered User
895 posts

Inger,
I was talking about after I added a text element, giving the element a class and then going into text edit. That's where I found the text-text-1 class. I hope that makes sense.
A Rose is Just a Weed in a Corn Patch!
User 2699991 Photo


Registered User
4,817 posts
Online Now

Ernie Hodge wrote:
Inger,
I was talking about after I added a text element, giving the element a class and then going into text edit. That's where I found the text-text-1 class. I hope that makes sense.

If you make changes to text in text editor mode it gives it a new inline class (span) The class assigned to the text element outside of text editor is a global class that styles are assigned to for that class, but not for the inline (edited text)u can style globally (say text = arial 18px centered. ) then all text with the same class are styled & appear the same but if you have styled one of the text elements (or part of one) in text editor (say different colour or emphasized) then that styling doesn't reflect in the other elements, unless you enter text editor & assign the inline (span) to some text)
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
Contact Me For One To One Assistance
https://alphathemes.coffeecup.com/forms … uman-lina/
User 187934 Photo


Senior Advisor
20,193 posts

Limit your inline styling. Your better off adding a text element and assigning a class for use else where.
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 188640 Photo


Registered User
895 posts

Wayan and Eric,

Thanks for the answers. I understand classes (and IDs) but isn't this like a class in a class?

Maybe I haven't asked the correct question. I'll have to come back tomorrow and get a little deeper with what I'm trying to do and why I was asking.
A Rose is Just a Weed in a Corn Patch!
User 379556 Photo


Registered User
1,536 posts

Some of the following is simply saying what has already been said in answers above, but I hope it will clarify rather than confuse the matter.

I think that it is best to regard the matter as follows, for which I have assumed one has created a paragraph.
1. All the main styling for the paragraph (font-style, colour etc.) are best made before going to Text Edit Mode. I find it helpful to change the class name for the paragraph to something that will be meaningful to me when wanting to create other paragraphs with the same main styling.
2. When editing the text in Text Edit Mode one may wish to have some small part of the paragraph in, say, italics. I highlight such a part in the text and make that part styled as italic, and change that internal style name for that small part to something meaningful to me.
3. That internal styling in no way is saved at part of the main styling in item 1 above. It is just a styling that one may choose to use in Text Mode in any other paragraph, and that other paragraph's main styling may be different from the styling used in item 1 above.

I work a lot with text, and have found it useful to take advantage of the fact that basic typography styling is available for containers and HTML elements, and for some things this can give more flexiblity. For example, one can set some of the typography settings for a container, so that all the paragraphs in that container share that basic styling. One can type text into an HTML element and use all the special characters one wants, and prevent wrapping of short sections of that text. I have often put the text in a div in an HTML element so that I can set the font styling for that div, and found that to be far more useful than putting, for example, paragraph elements in an HTML element.

Frank
User 188640 Photo


Registered User
895 posts

Frank,
Thank you, you explained it so the mechanical mind I have can 'get it'. I went back to Wayan and Eric's answers and now understand what they meant. Thank you everyone for the help.
A Rose is Just a Weed in a Corn Patch!

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.