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

#1 2011-09-02 13:39:09

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

HTML Backrounds!

How do I add a backround image or color to my website, http://www.plaxon.org/


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-09-02 13:49:17

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: HTML Backrounds!

Use Css.
<script type = 'text/css'>
body {
        background-image:url(linkToImage.format);
    }
</script>

or

<script type = 'text/css'>
body {
        background-color:#FF0000;
    }
</script>

Put that in your <head> or put it in a seperate stylesheet without the <script> tags to allow it to apply to all your pages  smile

Last edited by sparks (2011-09-02 13:49:56)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#3 2011-09-02 14:00:44

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: HTML Backrounds!

Thanks! Can you give me the code for a commenting system, with the default username Guest?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#4 2011-09-02 14:25:46

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: HTML Backrounds!

I think maybe you should actually get some content on your site first  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#5 2011-09-02 14:27:02

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: HTML Backrounds!

There is on other pages. I only started making it yesterday.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#6 2011-09-02 14:35:58

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: HTML Backrounds!

WindowsExplorer wrote:

Thanks! Can you give me the code for a commenting system, with the default username Guest?

this is going to require PHP and SQL

and here is it (MIGHT HAVE BUTS I AM TIRED WHILE WRITING THIS FOR YOU !)
Make sure u have an SQL setup before running this.

the code for adding comment

Code:

<?php
$com = $_GET['comment'];
$name = $_GET['usr'];
$con = mysql_connect('localhost','root','');
$exis = mysql_select_db('comm');
if(!exis){
 mysql_query('create database comm');
 mysql_select_db('comm');
 mysql_query('create table comments(NAME varchar(255),MSG varchar(512));
}
$q = mysql_query("insert into comments values('".$name."','".$com."')");

mysql_close();
?>

the code for displaying them

Code:

<?php
$con = mysql_connect();
mysql_select_db('comm');
$q  = mysql_query('select * from comments');
echo '<?xml version=1.1> <msgs>';
while($r = mysql_fetch_assoc($q)){
  echo '<msg><name>'.$r['NAME'].'</name><msg>'.$r['MSG'].'</msg>';
}
echo '</msgs>';
?>

on client side you will have to use javascript and HTML semantics


may i do it tomorrow ?? pl0x i am too tired and i need sleep

Last edited by fanofcena (2011-09-02 14:36:45)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#7 2011-09-02 14:41:27

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: HTML Backrounds!

sparks wrote:

I think maybe you should actually get some content on your site first  smile

probably he got no clue on how hard is it to write this -.- i mean i can write the client aswell  but i hope that you write it simply use xmlhttprequest (cross browser) over my post to paste em and a get request to post em please  smile  lol it saves us both half the work  wink


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

Board footer