View Full Version : Coding help please


SaraGates
01-12-2007, 05:51 PM
Okay, so I've made a layout (My very first one yeey) and I'd like some help with the coding.

Here's the layout:
http://i11.photobucket.com/albums/a167/Sara92/temp_lay.jpg

How do you code so I can write stuff in the brighter green part? Please help.

Thanks a milion in advance x

I'd be very very thankful if anyone could help me tonight :) Thank you:princess:

Ges
01-12-2007, 08:08 PM
Hi SaraGates,
Here is a quick way using tables. But it's much nicer to do it with CSS. I presume you have the 'I love you 4 ever' picture?
Just place it in the <img src=....> section.
As I say, this is NOT hte proper way to do this by any means but it will help.
When you get the time try to take a look at Lissa's tutorials and also

http://www.w3schools.com

Just copy this;


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>

<body>

<table border="0" cellspacing="20" bgcolor="#564E2A">
<tr>
<td>
<img src="I LOVE YOU 4EVER PIC HERE.jpg" width="420" height="350">
</td>
</tr>
<tr>
<td align="center" bgcolor="#968A5A" width="420">
<font color="#FFFFFF">
Hello this is some text<br>
and this is a new line<br>
and this is another new line<br>
and so on.<br>
</font>
</td>
</tr>
</table>

</body>
</html>


Hope this helps,
Regards,
Ges.

SaraGates
01-12-2007, 08:26 PM
thanks *hugs*:)

Is it possible to move the table up abit on the page? So it's not so long down the page?:confused: :)

Ges
01-12-2007, 10:17 PM
Hi SaraGates,

Just change the 'height' values in th <td> parts. Here's the code again with a 'height' added to the text section. Just change the values for them and see the effect, ( also the width values ).


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>

<body>

<table border="0" cellspacing="20" bgcolor="#564E2A">
<tr>
<td>
<img src="I LOVE YOU 4EVER PIC HERE.jpg" WIDTH="320" HEIGHT="250">
</td>
</tr>
<tr>
<td align="center" bgcolor="#968A5A" WIDTH="320" HEIGHT="100">
<font color="#FFFFFF">
Hello this is some text<br>
and this is a new line<br>
and this is another new line<br>
and so on.<br>
</font>
</td>
</tr>
</table>

</body>
</html>


Regards,
Ges.

SaraGates
01-13-2007, 03:20 PM
This is the coding I got so far:
<HTML>
<HEAD>
<TITLE>I Love Gaz 4eva</TITLE>
<LINK REL=stylesheet HREF="/cams.css" TYPE="text/css">
<img style="position:absolute; top:0px; left:0px; "
src="http://i11.photobucket.com/albums/a167/Sara92/temp_lay.jpg" border="0">
<body
background="http://i11.photobucket.com/albums/a167/Sara92/backg.jpg">
</body>
I'm very happy with it, and I'd like it to look like that, but I've still got the same problem...how do I code so I can write in the bright green part?? Anyonw who knows? I'm so confused:confused:

Ges
01-14-2007, 08:59 AM
Hi SaraGates,
I've tidied up the code and made it more readable and usable for you.

Just change the values in the <style> section until you're happy.
Theres lots of thing you can do with style sheets ( CSS ), and here is a direct link to a quick tutorial. It would be worth finding a couple of hours ( not days etc!!! ), giong through it as it has lots of examples.

Run this code as it is;


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>I Love Gaz 4eva</title>

<style type="text/css">

body {background-image: url("http://i11.photobucket.com/albums/a167/Sara92/backg.jpg");}

img.sara_img {position:absolute; top:0px; left:0px;}

div.sara_text {position:absolute; top:550px; left:60px;font-family:Comic Sans MS;
font-size: 20px;font-weight: bold;color:#FFFFFF;text-align:left}

</style>

</head>

<body>
<img class="sara_img" src="http://i11.photobucket.com/albums/a167/Sara92/temp_lay.jpg" border="0">
<div class="sara_text">
Now you can position this text wherever you need.<br>
Just play with the values in div.sara_text.
</div>

</body>
</html>


Now you can use as many <div>'s as you like just give them a new style part.

Hope this helps.
Regards,
Ges.

Hi SaraGates,

OOPS!!
I forgot the link!!! Silly me.

Here it is;

http://www.w3schools.com/css/default.asp


Have fun.

Regards,
Ges.

SaraGates
01-14-2007, 04:53 PM
Omg thank you so much Ges. You're a STAR *hugs* Thanks alot for all your help<33

Ges
01-14-2007, 11:44 PM
Hi SaraGates,
Just thought I'd mention something that might interest you and other members who may be wondering about some of the most beautiful things that can be done to a website simply by using CSS. Especially a topic known as 'skinning'. This effect ( used correctly ), allows you to completely change the look and feel of any page your heart desires with just a few simple changes to the <style> parameters.
I must admit ( being a server side software thingy etc - sorry I'm from England, Uk so my wordology might sound daft ), that when I played around with CSS I saw the potential and - wow!
The Lady responsible for my sidetracking ( for want of better words ), was a dear member known as AMYAURORA and upon posting a question about some styles/layaouts 6 months ago she directed me to a site that changed my attidude to style sheets. This is where she pointed me;

http://www.csszengarden.com/

Just go there and enjoy.

Sorry AMYAURORA for using your handle and references but I thought it was appropriate in the context of helpling, ( just like you did for me!!! ).

Regards,
Ges.

SaraGates
01-15-2007, 01:56 PM
Thanks for the link:)

Anyway, please have a look how my site turned out:

www.gaz4eva.minsite.net

:D x

Ges
01-15-2007, 05:54 PM
Hi SaraGates,
Nice one. You got there at last - hence my signature - 'Endeavour to Persevere'. Glad it's ok and that your friends are too ( I looked at the guest book, ha ha )!

However, oh no she says, there are a couple of things you can do now that you've got a grasp of things. Firstly, there is is </div> missing at the bottom just before the </body>. Other than that all is ok.
Now, if you want to play a bit further with the CSS try this. I've put in a bit more control of your text for you and a border that can be turned on or off
and tidied up the overall code.
Also the text can be set to left, right or justify. It just looks a bit nicer I feel.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<script type="text/JavaScript">
statuss();
function statuss()
{
window.status = "Gareth Paul Gates <3";
setTimeout("statuss()", 1);
}
</script>
<title>Your time has come to shine...</title>

<style type="text/css">
b{color:#006633 ; font-family:Verdana; font-size:10pt;}

i{color:pink; font-family:Verdana; font-size:11px;}

u{{color:blue; font-family:Verdana; font-size:7.5pt;}

.header {
background-color: #B8AA74;
border: 0px solid #000000;
font-family: Verdana;
font: bold 9pt Arial, sans-serif;
color: #003300;
padding: 2px;
text-align:center}


body {background-image: url("http://i11.photobucket.com/albums/a167/Sara92/backg.jpg");}

img.sara_img {position:absolute; top:0px; left:0px;}

div.sara_text {position:absolute; top:550px; left:150px;font-family:Comic Sans MS;
font-size: 14px;font-weight: bold;color:#003300;text-align:center;
border-style: ridge;border-width: 10px}
</style>

</head>

<body>
<img class="sara_img" src="http://i11.photobucket.com/albums/a167/Sara92/temp_lay.jpg" alt="" border="0">
<div class="sara_text">
<div class="header">14/01/07</div>
<br>
Hello guys!
<br>
The site is finally back!
<br>
I'll try and update it as often as I can :)
<br>
Don't forget to sign the <font size="0"><a href="http://www.contact.cybertools.se/guestbook.asp?id=17469" target=_blank>guestbook</a> </font>.
<br>
Thank you.
<br>
And, there's a new picture and message on Gareth's <font size="0"><a href="http://www.garethgates.com" target=_blank>site</a> </font>.
<br>
<br>
- Sara
</div>
<script type="text/javascript" src="/i.js">
<!--
//-->
</script>
</div>
</body>
</html>



In the new div.sara_text;

div.sara_text {position:absolute; top:550px; left:150px;font-family:Comic Sans MS;
font-size: 14px;font-weight: bold;color:#003300;text-align:center;
border-style: ridge;border-width: 10px}


just change the 'border-width: 10px' to 0px to turn it off.
Change the 'text-align:center' to 'text-align:left' to make the text as you had it.
Note the new line in the .header to align the date to center cos you don't need the <center> stuff anymore when using CSS.
But you don't have to bother with the above. Just thought it might help.

Well good luck with your efforts.
Regards,
Ges.