CSS Selector (Style Panel)

User 3106757 Photo


Registered User
10 posts

I have two questions:

1st Question:

When dropping any element on canvas, site designer adds it's own class name. For example in case of 'button' element it adds class name "a.link-button".

Now if i give my own class name ".btn", then it should be "a.btn", not "a.link-button.btn".

My question is how can we remove ".link-button" class so that it becomes "a.btn" ?

2nd Question:

One element can have multiple classes. My question is how to add them in site designer?

For example like this <button class="btn btn-primary btn-nav"></button>

site designer creates CSS wrongly. see 2nd screenshot.

Attachments:
User 379556 Photo


Registered User
1,536 posts

In the 'Your Styles Panel CSS' section of the Inspector panel, the screen-shot 2.png shows the CSS used in the main.css file created by Site Designer, and it is indeed different from what one might expect if one were simply using an HTML editor to create a web page. The fact that it is different doesn't make it wrong, as can be checked by using validator services such as https://jigsaw.w3.org/css-validator/ and https://validator.w3.org/nu/ on an exported SD project.

The bit that SD adds to the class name is simply part of how SD is designed to work, identifying what type of element one is using. It helps one to create a web page with correct code quickly and easily. It should not be interfered with by trying to remove the extra part of the CSS selector.

For those who don't code, it doesn't matter in the least. For those who do code, it can sometimes be important to be aware of the extra bit added to the class name. For example, if one uses document.querySelector in a bit of JavaScript in an SD project file, it will not work unless one references the full class name as shown in the 'Your Styles Panel CSS' section of the Inspector panel.

The matter can seem a bit of a nuisance on occasions, such as when one accidentally chooses an element that is not the one that is best for the job. If one chose a button-link element when a button element would have been better, the cleanest remedy is to remove the button-link element and replace it with a button element. Changing the button-link element by changing the cursor setting and ensuring that the href does nothing (e.g. using #!) is messy.

Frank
User 3106757 Photo


Registered User
10 posts

Site designer needs a lot of improvements.

I have one more question and I know it's not related to the post.

I purchased it 2 months ago. Can I get a refund for it?

User 2699991 Photo


Registered User
4,817 posts
Online Now

Muhammad Abubakar wrote:
Site designer needs a lot of improvements.

I purchased 2 months ago. Can I get a refund for Site designer?

I know this question is not related to the post.

Just because you can't figure out how to use it doesn't mean it needs improving, perhaps you need to learn how to use it. to answer your question no you can't get a refund after this amount of time.
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/

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.