Discuss Scratch

dertermenter
Scratcher
1000+ posts

derter-menter.github.io

my website so far

I’ve learnt classes and how to make a button, how can I make it so the buttons go to a link when you press it?

Last edited by dertermenter (Jan. 16, 2022 22:16:27)



The2000 wrote:

All suggestions are unnecessary. If a suggestion is necessary then it's a bug report.

dertermenter wrote:

April Fools Day on the forums has been a repeated privilege, not an expectation
Chiroyce
Scratcher
1000+ posts

derter-menter.github.io

dertermenter wrote:

I’ve learnt classes and how to make a button, how can I make it so the buttons go to a link when you press it?
I'll make a PR!







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
Socialix
Scratcher
1000+ posts

derter-menter.github.io

dertermenter wrote:

my website so far

I’ve learnt classes and how to make a button, how can I make it so the buttons go to a link when you press it?
From what I did, you can put the button inside a link and it will redirect you to a site if you press it:
<a href="https://scratch.mit.edu/projects/editor"><button>Scratch Online Editor</button></a>

socialix - why is there a penguin breaking my window? - signatures are overrated
Chiroyce
Scratcher
1000+ posts

derter-menter.github.io

Socialix wrote:

From what I did, you can put the button inside a link and it will redirect you to a site if you press it:
I did the opposite, link inside the button
https://github.com/derter-menter/derter-menter.github.io/pull/4







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
dertermenter
Scratcher
1000+ posts

derter-menter.github.io

Chiroyce wrote:

Socialix wrote:

From what I did, you can put the button inside a link and it will redirect you to a site if you press it:
I did the opposite, link inside the button
https://github.com/derter-menter/derter-menter.github.io/pull/4
I was working on this when you did the pull, so the pull has conflicts. You seemed to have added a class that makes all buttons text colour white - this is perfect, but my code doing it doesn’t work. Please may you (or anyone) do another PR making the text colour on buttons white?


The2000 wrote:

All suggestions are unnecessary. If a suggestion is necessary then it's a bug report.

dertermenter wrote:

April Fools Day on the forums has been a repeated privilege, not an expectation
BarelySmooth
Scratcher
1000+ posts

derter-menter.github.io

dertermenter wrote:

Chiroyce wrote:

Socialix wrote:

From what I did, you can put the button inside a link and it will redirect you to a site if you press it:
I did the opposite, link inside the button
https://github.com/derter-menter/derter-menter.github.io/pull/4
I was working on this when you did the pull, so the pull has conflicts. You seemed to have added a class that makes all buttons text colour white - this is perfect, but my code doing it doesn’t work. Please may you (or anyone) do another PR making the text colour on buttons white?
When you use the .a CSS selector, you are selecting any element that has a class with the name “a”.

But it looks like you are trying to select all anchor (link) tags, which is why you shouldn't prefix the selector with a dot.


/* This makes all elements having the class name "a" become white in colour. This isn't what you want. */
.a {
   color: white;
}
/* On the other hand, this line of CSS will make sure that all links (anchor tags) are white in colour */
a {
   color: white;
}
/* The above code works fine, but now all links on the page are white in colour. To fix this, you can modify the selector so that only links inside buttons are white in color */
button a {
   color: white;
}

You can read more about Type selectors and Class selectors on MDN.

Last edited by BarelySmooth (Jan. 15, 2022 19:58:48)


Banner credit: @Prime689








(This text below is my forum signature)

Scratch Team never wrote:

Good suggestion. Let’s add that.
no offense to ST btw – Credit to @Fun_Cupcake_i81 for the above portion of the signature

Also, Nobody supports the support convention



404. That's an error.

The requested signature was not found under this post.
That's all we want you to know.
Chiroyce
Scratcher
1000+ posts

derter-menter.github.io

dertermenter wrote:

Please may you (or anyone) do another PR making the text colour on buttons white?
Seems fixed… did you fix it? If you did, good job!








April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
helloworldbyeworld
Scratcher
1000+ posts

derter-menter.github.io

I have a suggestion. Maybe you could make the info text in a sans-serif font? You can also use Google Fonts for more fonts that you can use on the website.

Helloworldbyeworld | 1200+ posts
Have a great day
dertermenter
Scratcher
1000+ posts

derter-menter.github.io

helloworldbyeworld wrote:

I have a suggestion. Maybe you could make the info text in a sans-serif font? You can also use Google Fonts for more fonts that you can use on the website.
Nah I like the default font


The2000 wrote:

All suggestions are unnecessary. If a suggestion is necessary then it's a bug report.

dertermenter wrote:

April Fools Day on the forums has been a repeated privilege, not an expectation
MagicCrayon9342
Scratcher
1000+ posts

derter-menter.github.io

To make the text a bit nicer looking you could add a fixed width and height div and put the text in it and either put it on the left center or middle. It'll look great i promise.

helloworldbyeworld
Scratcher
1000+ posts

derter-menter.github.io

I also have some other suggestions.

1. Maybe wrap the link buttons and the welcome text in a div to make a top bar?
2. Maybe make the link buttons have some border-radius so they are rounded and add a ~2-5px border for them so they look nicer?
3. Maybe add some more space between the welcome and the text?

Last edited by helloworldbyeworld (Jan. 17, 2022 19:19:14)


Helloworldbyeworld | 1200+ posts
Have a great day
MagicCrayon9342
Scratcher
1000+ posts

derter-menter.github.io

helloworldbyeworld wrote:

(#31)
I also have some other suggestions.

1. Maybe wrap the link buttons and the welcome text in a div to make a top bar?
2. Maybe make the link buttons have some border-radius so they are rounded and add a ~2-5px border for them so they look nicer?
3. Maybe add some more space between the welcome and the text?
It's generally not that easy to make a navbar that actually touches the corners. And getting a good color. For that Tailwind would be good

dertermenter
Scratcher
1000+ posts

derter-menter.github.io

MagicCrayon9342 wrote:

To make the text a bit nicer looking you could add a fixed width and height div and put the text in it and either put it on the left center or middle. It'll look great i promise.
I have no clue do to what you said

helloworldbyeworld wrote:

I also have some other suggestions.

1. Maybe wrap the link buttons and the welcome text in a div to make a top bar?
2. Maybe make the link buttons have some border-radius so they are rounded and add a ~2-5px border for them so they look nicer?
3. Maybe add some more space between the welcome and the text?
I could do 3, don’t know how to do the first two


The2000 wrote:

All suggestions are unnecessary. If a suggestion is necessary then it's a bug report.

dertermenter wrote:

April Fools Day on the forums has been a repeated privilege, not an expectation
god286
Scratcher
1000+ posts

derter-menter.github.io

MagicCrayon9342 wrote:

It's generally not that easy to make a navbar that actually touches the corners. And getting a good color. For that Tailwind would be good

It's easy to do that. Just put it at the top of your HTML and make width and height fit the screen.

Last edited by god286 (Jan. 17, 2022 21:12:05)


Here are some of my followers!

I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
Chiroyce
Scratcher
1000+ posts

derter-menter.github.io

MagicCrayon9342 wrote:

It's generally not that easy to make a navbar that actually touches the corners
It's easy, set margin and padding on the root to 0; then stretch the navbar's div to 100vw; and preferred amount of vh;

dertermenter wrote:

I could do 3, don’t know how to do the first two
I can make a PR #2 for now…

edit: MagicCrayon made a PR, so i'll add it to their fork

Last edited by Chiroyce (Jan. 18, 2022 02:49:40)








April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
MagicCrayon9342
Scratcher
1000+ posts

derter-menter.github.io

Chiroyce wrote:

(#35)

MagicCrayon9342 wrote:

It's generally not that easy to make a navbar that actually touches the corners
It's easy, set margin and padding on the root to 0; then stretch the navbar's div to 100vw; and preferred amount of vh;

dertermenter wrote:

I could do 3, don’t know how to do the first two
I can make a PR #2 for now…
root? huh? i don't know of a root tag.

Chiroyce
Scratcher
1000+ posts

derter-menter.github.io

MagicCrayon9342 wrote:

root? huh? i don't know of a root tag.
Asterisk (*) means all elements, so if you add this to the to the CSS file, then the browser-set margins will be reset. Not root, sorry, I meant the asterisk (*).

* {
    margin: 0;
    padding: 0;
}







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
god286
Scratcher
1000+ posts

derter-menter.github.io

Chiroyce wrote:

MagicCrayon9342 wrote:

root? huh? i don't know of a root tag.
Asterisk (*) means all elements, so if you add this to the to the CSS file, then the browser-set margins will be reset. Not root, sorry, I meant the asterisk (*).

* {
    margin: 0;
    padding: 0;
}
Wouldn't
body {
    margin: 0;
    padding: 0;
}
be better?


Here are some of my followers!

I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
dertermenter
Scratcher
1000+ posts

derter-menter.github.io

https://derter-menter.github.io/dark

Trying to make a dark mode, then a button to switch between the two. How can I change the text colour in just 1 CSS file?


The2000 wrote:

All suggestions are unnecessary. If a suggestion is necessary then it's a bug report.

dertermenter wrote:

April Fools Day on the forums has been a repeated privilege, not an expectation
Chiroyce
Scratcher
1000+ posts

derter-menter.github.io

dertermenter wrote:

Trying to make a dark mode, then a button to switch between the two. How can I change the text colour in just 1 CSS file?
CSS variables?

Last edited by Chiroyce (Jan. 23, 2022 14:57:08)








April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence

Powered by DjangoBB