This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-04-30 17:34:08

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Website Help

Hi guys! I'm working on my site, but I am having trouble with CSS.
I have a css file and I put the little code thing on my test page to see if it works, but it doesn't.
Help?


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#2 2010-04-30 18:03:21

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Website Help

I don't bother with external style sheets. I just put the css in the web page HTML


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#3 2010-04-30 18:37:45

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Website Help

16Skittles wrote:

I don't bother with external style sheets. I just put the css in the web page HTML

But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.

Are you using this code?

Code:

<link rel="stylesheet" type="text/css" href="URL">

Offline

 

#4 2010-04-30 18:41:18

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Website Help

coolstuff wrote:

16Skittles wrote:

I don't bother with external style sheets. I just put the css in the web page HTML

But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.

Are you using this code?

Code:

<link rel="stylesheet" type="text/css" href="URL">

well, i don't have an actual web site. I'm talking about my test in frontpage.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#5 2010-04-30 19:07:55

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

coolstuff wrote:

16Skittles wrote:

I don't bother with external style sheets. I just put the css in the web page HTML

But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.

Are you using this code?

Code:

<link rel="stylesheet" type="text/css" href="URL">

Should I like to my css file? Like www.websitename.com/style1.htm?


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#6 2010-04-30 21:05:02

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Website Help

Dazachi wrote:

coolstuff wrote:

16Skittles wrote:

I don't bother with external style sheets. I just put the css in the web page HTML

But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.

Are you using this code?

Code:

<link rel="stylesheet" type="text/css" href="URL">

Should I like to my css file? Like www.websitename.com/style1.htm?

First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.

On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:

<style type='text/css"> or anything other than pure formatting.

Offline

 

#7 2010-04-30 21:42:54

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

coolstuff wrote:

Dazachi wrote:

coolstuff wrote:


But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.

Are you using this code?

Code:

<link rel="stylesheet" type="text/css" href="URL">

Should I like to my css file? Like www.websitename.com/style1.htm?

First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.

On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:

<style type='text/css"> or anything other than pure formatting.

Yeah, I meant .css.
And I just was copying some code from w3schools to test it and it doesn't work.  sad


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#8 2010-05-01 09:09:23

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Website Help

Dazachi wrote:

coolstuff wrote:

Dazachi wrote:


Should I like to my css file? Like www.websitename.com/style1.htm?

First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.

On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:

<style type='text/css"> or anything other than pure formatting.

Yeah, I meant .css.
And I just was copying some code from w3schools to test it and it doesn't work.  sad

Mind if I look at the source code? I have considerable experience in website design  smile  Run my own website, made a few layouts for other people...

Offline

 

#9 2010-05-01 09:11:39

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

coolstuff wrote:

Dazachi wrote:

coolstuff wrote:


First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.

On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:

<style type='text/css"> or anything other than pure formatting.

Yeah, I meant .css.
And I just was copying some code from w3schools to test it and it doesn't work.  sad

Mind if I look at the source code? I have considerable experience in website design  smile  Run my own website, made a few layouts for other people...

Ok.
www.dazachi.webs.com/style1.css
www.dazachi.webs.com/test.htm

I'm using t35 to host, but testing with webs.


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#10 2010-05-01 09:24:04

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Website Help

The HTML you want to modify should be in test.htm, not style1.css


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#11 2010-05-01 09:24:53

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

gershmer wrote:

The HTML you want to modify should be in test.htm, not style1.css

I'm trying to put a navbar on all my pages with css.


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#12 2010-05-01 09:32:05

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Website Help

Dazachi wrote:

gershmer wrote:

The HTML you want to modify should be in test.htm, not style1.css

I'm trying to put a navbar on all my pages with css.

You can't. That's not what CSS does. It styles the navbar. Not creates it.

I recommend, if your so lazy, instead of typing the code everytime, use iframes.

1. Create a page that contains the HTML for the navbar (this will be a universal page, displayed on all pages, when you put in the iframe code) and be sure to link the CSS to it.
2. Use this code:

Code:

<iframe src ="URL TO NAVBAR PAGE" width="WIDTH" height="HEIGHT" frameborder="0" scrolling="no">

Put this wherever you want in any of your pages where a navbar is needed.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#13 2010-05-01 09:32:52

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Website Help

Dazachi wrote:

gershmer wrote:

The HTML you want to modify should be in test.htm, not style1.css

I'm trying to put a navbar on all my pages with css.

Which you can't do. If want to do that, rename all of your pages with a .php extention, make another page for the navbar, and use PHP Include() to do that.

Here's the code to include:

Code:

<?php include("Page with navbar") ?>

And it's just that simple! You'll have to take the lists out of the CSS page though.

I would STRONGLY advise against using iframes as Gershmer suggested, because they are not at all flexible. Only use them if you absolutely must.

By the way, PHP include won't work with Webs, because it doesn't have PHP. But when you transport it on to t35, it'll work. Why don't you just test it there?

Last edited by coolstuff (2010-05-01 09:34:48)

Offline

 

#14 2010-05-01 09:46:34

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

Thank guys. I'll post if I need anymore help. I'm going with the php.
Wow. I was really confused, wasn't I?


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#15 2010-05-01 09:54:47

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

I'm confused again. I don't know anything about php. Is it like a whole new language or something?


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#16 2010-05-01 10:14:10

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Website Help

coolstuff wrote:

Dazachi wrote:

gershmer wrote:

The HTML you want to modify should be in test.htm, not style1.css

I'm trying to put a navbar on all my pages with css.

Which you can't do. If want to do that, rename all of your pages with a .php extention, make another page for the navbar, and use PHP Include() to do that.

Here's the code to include:

Code:

<?php include("Page with navbar") ?>

And it's just that simple! You'll have to take the lists out of the CSS page though.

I would STRONGLY advise against using iframes as Gershmer suggested, because they are not at all flexible. Only use them if you absolutely must.

By the way, PHP include won't work with Webs, because it doesn't have PHP. But when you transport it on to t35, it'll work. Why don't you just test it there?

When PHP is run by the browser, the end-user HTML is iframes.

Try it. Create something with php include, and then view the source after it has run on your webserver. IFRAMES.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#17 2010-05-01 10:15:25

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Website Help

Dazachi wrote:

I'm confused again. I don't know anything about php. Is it like a whole new language or something?

It's a server-side language.

http://PHP.net


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#18 2010-05-01 10:31:33

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

So I should use iframes now?


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#19 2010-05-01 10:32:49

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Website Help

Dazachi wrote:

So I should use iframes now?

When php is compiled so it can be run on a server, all the includes turn into IFRAMES,


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#20 2010-05-01 10:36:55

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: Website Help

Use the external code, simple  tongue  I guess I came in late with that one.


Scratchin' since 2007

Offline

 

#21 2010-05-01 10:43:58

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

I am so confused. Which way is the easiest, but still looks good?


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#22 2010-05-01 10:55:58

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: Website Help

Dazachi wrote:

I am so confused. Which way is the easiest, but still looks good?

Easiest is using internal CSS (ex: <style type="text/css">Code</style>). But it is very messy for you to code your page with a bunch of CSS code in there. So I fully recommend external.


Scratchin' since 2007

Offline

 

#23 2010-05-01 10:57:10

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: Website Help

adriangl wrote:

Dazachi wrote:

I am so confused. Which way is the easiest, but still looks good?

Easiest is using internal CSS (ex: <style type="text/css">Code</style>). But it is very messy for you to code your page with a bunch of CSS code in there. So I fully recommend external.

I was told CSS is only for styling? Not for making navbars.


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#24 2010-05-01 10:59:03

J0j2
Scratcher
Registered: 2008-08-20
Posts: 1000+

Re: Website Help

Well, there's a really nice site called w3schools I think, and it has really good CSS coding help.


Happiness is a habit. You can help the world practice happiness a little more. Visit the 'Happiness List' below and post a list of 100 things that make you happy!
http://i.imgur.com/dMpk2.jpg?1?4499

Offline

 

#25 2010-05-01 11:07:59

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Website Help

J0j2 wrote:

Well, there's a really nice site called w3schools I think, and it has really good CSS coding help.

He was using some code from there, but it didn't work.  sad


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

Board footer