Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

richardgary1223
Guest
How do you code.. like JS or CSS.. do you put some simple language in it and put some dots and " " in it.. the question is just how.. I dunno..n ???

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
Well just putting random dots and quotes wouldn't help you much.

I suggest you take a look at some of the tutorials that there are... They're very handy.

In most cases, you have to put the coding in set tags. For example:

<script>
</script>


for JS and

<style>
</style>


for CSS.

Then you have to learn the syntax (the actual 'wording' of the codes) and then use that.

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
It's kinda like a second language to some coders. Different languages have different syntaxes.

CSS is all about styling elements. Just from that, we need to know two things: the element to style and the styling to apply.

Syntax:
element {
Styling
}

Styling is usually of this syntax:
styling_name: styling_value;
styling_name2: styling_value2;

So, first off, we need to know the element to manipulate. There are different ways of doing this. We can reference a general type of element (i.e. td, tr, table, div), a class (i.e. .windowbg, .windowbg2, .catbg), or an ID (i.e. #forumjump). There's a few other things (like selectors), but I won't be covering them. It's not worth confusing you right now. :) Just know that you must use a:link instead of a.

Alright, so let's select an element and add some styling. First thing is to grab an element.

.windowbg {
styling here
}

So that'll modify any element that has a class of "windowbg." How do we know it's a class and not an ID or element? Easy. Classes are ALWAYS prefixed with a period. IDs are ALWAYS prefixed with an ID. Elements NEVER have a prefix. However, elements can have a suffix.

td.windowbg {
styling here
}

That'll select all TD's with a class of "windowbg" Note that I didn't put a space. Putting a space completely changes the meaning. This is the next thing. If you put a space between two elements, you're saying that the first is a parent element of the second. So, if we had this HTML source:

<table class="whee">
<tr>
<td id="dude">
<font class="whee">
Test
</td>
</tr>
</table>

putting this would style the table:
table.whee {
styling here
}

while putting this would style the font tag:
font.whee {
styling here
}

and this would also style the font tag: (NOTE THE SPACE)
td .whee {
styling here
}

Also, the PARENT does not have to be a PARENT, it can be a GRANDPARENT or GREATGRANDPARENT element. (Caps are just fun, no?). So, tr .whee refers to the same element as td .whee in this case.

The last thing to mention is that you can have multiple specifications listed for a styling set.

td .whee, font, table.whee {
styling here
}

Those would all receive the same styling. Notice how they're separated by commas? Yeah, that's how you do it. :)

As for the actual styling... your best bet is to look at some CSS sources and find some parameters they use so you can see some you can use. :)


Last Edit: May 1, 2008 18:24:56 GMT by Chris

Naeem

Naeem Avatar

**
Official Member

93


April 2008
0100010101010001101000

Best styling ever, right there.

richardgary1223
Guest
Chris Avatar
It's kinda like a second language to some coders. Different languages have different syntaxes.

CSS is all about styling elements. Just from that, we need to know two things: the element to style and the styling to apply.

Syntax:
element {
Styling
}

Styling is usually of this syntax:
styling_name: styling_value;
styling_name2: styling_value2;

So, first off, we need to know the element to manipulate. There are different ways of doing this. We can reference a general type of element (i.e. td, tr, table, div), a class (i.e. .windowbg, .windowbg2, .catbg), or an ID (i.e. #forumjump). There's a few other things (like selectors), but I won't be covering them. It's not worth confusing you right now. :) Just know that you must use a:link instead of a.

Alright, so let's select an element and add some styling. First thing is to grab an element.

.windowbg {
styling here
}

So that'll modify any element that has a class of "windowbg." How do we know it's a class and not an ID or element? Easy. Classes are ALWAYS prefixed with a period. IDs are ALWAYS prefixed with an ID. Elements NEVER have a prefix. However, elements can have a suffix.

td.windowbg {
styling here
}

That'll select all TD's with a class of "windowbg" Note that I didn't put a space. Putting a space completely changes the meaning. This is the next thing. If you put a space between two elements, you're saying that the first is a parent element of the second. So, if we had this HTML source:

<table class="whee">
<tr>
<td id="dude">
<font class="whee">
Test
</td>
</tr>
</table>

putting this would style the table:
table.whee {
styling here
}

while putting this would style the font tag:
font.whee {
styling here
}

and this would also style the font tag: (NOTE THE SPACE)
td .whee {
styling here
}

Also, the PARENT does not have to be a PARENT, it can be a GRANDPARENT or GREATGRANDPARENT element. (Caps are just fun, no?). So, tr .whee refers to the same element as td .whee in this case.

The last thing to mention is that you can have multiple specifications listed for a styling set.

td .whee, font, table.whee {
styling here
}

Those would all receive the same styling. Notice how they're separated by commas? Yeah, that's how you do it. :)

As for the actual styling... your best bet is to look at some CSS sources and find some parameters they use so you can see some you can use. :)


Ya! I got it.. :)

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
Naeem Avatar
0100010101010001101000

Best styling ever, right there.


01001110 01101111 00101100 00100000 01110100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100010 01100101 01110100 01110100 01100101 01110010 00101110 00001101 00001010 01011001 01101111 01110101 00100111 01110010 01100101 00100000 01101111 01101110 01100101 00100000 01100100 01101001 01100100 01101110 00100111 01110100 00100000 01100101 01110110 01100101 01101110 00100000 01101101 01100001 01101011 01100101 00100000 01110011 01100101 01101110 01110011 01100101 00101110



:)

Naeem

Naeem Avatar

**
Official Member

93


April 2008
01001101011010010110111001100101001000000111
01110110000101110011001000000110000101101101
01100001011110100110100101101110011001110010
11000010000001110011011010000111010101110100
00100000011101010111000000101110001000000100
10010111010000100111011100110010000001100101
01101110011000110111001001111001011100000111
01000110010101100100001011000010000001100101
01101110011000110111001001111001011100000111
01000110010101100100001000000110001001101001
01101110011000010111001001111001001000000110
00110110111101100100011001010010111000100000
01001110011011110111010000100000011001010111
01100110010101101110001000000110000100100000
01100011011011110110110101110000011101010111
01000110010101110010001000000110001101100001
01101110001000000110010001100101011000110111
00100111100101110000011101000010000001101001
01110100001011100010000001000101011100000110
10010110001100100000011001100110000101101001
0110110000100001


Last Edit: May 2, 2008 20:03:44 GMT by Naeem

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
Naeem Avatar
01001101011010010110111001100101001000000111
01110110000101110011001000000110000101101101
01100001011110100110100101101110011001110010
11000010000001110011011010000111010101110100
00100000011101010111000000101110001000000100
10010111010000100111011100110010000001100101
01101110011000110111001001111001011100000111
01000110010101100100001011000010000001100101
01101110011000110111001001111001011100000111
01000110010101100100001000000110001001101001
01101110011000010111001001111001001000000110
00110110111101100100011001010010111000100000
01001110011011110111010000100000011001010111
01100110010101101110001000000110000100100000
01100011011011110110110101110000011101010111
01000110010101110010001000000110001101100001
01101110001000000110010001100101011000110111
00100111100101110000011101000010000001101001
01110100001011100010000001000101011100000110
10010110001100100000011001100110000101101001
0110110000100001


Mine was amazing, shut up. It's encrypted, encrypted binary code. Not even a computer can decrypt it. Epic fail!

richardgary1223
Guest
Like for CSS:

p
{
text-align: right;
color: red;
font-family: Comic Sans MS
}


It is made of three parts, right?

the first one I used:
p {text-align: right}
body {color: red}
p {font-family: Comic Sans MS}
p {text-align: right;color: red}


Chris

Chris Avatar

******
Head Coder

19,519


June 2005
You can break it up into many different sub-sets if you wish. Most people try to group as many as possible together to speed up load times though. ;)

richardgary1223
Guest
Oh yeah..

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Just use your own style and stick with that. Once you get better, you can worry about optimization. It's just like calculus... you gotta do a derivative the long way before you do it the short way. (if you haven't taken calculus, that's a bad analogy, sorry. :P)

newBookmarkLockedFalling