Jump to content

Recommended Posts

Posted

Okay, so firstly to code CSS we need to open up the CSS tags

 

<br />
<br />

 

In between the tags we can now start styling our web pages

 

Firstly, to style a certain part of the website you need it's ID or Name. If we are editing for example a div that uses ID="Main" we would have to write the code like this

#Main {

}

 

But if we are using the name="Main" tag we would write the code like this

.Main {

}

 

To style anything else like the body of the page you would write the code like this

body {

}

 

Our styling codes then go in between the { and }.

 

So I will now write a list of different definitions

 

Styling fonts

font-family: FONTNAME;
font-size: 12px;
color: HEX/COLOURNAME;
font-weight: bold/none;
text-decoration: underline/none;

 

Adding a border

border: 1px solid #000000;

 

Backgrounds

background-color: HEX/COLOURNAME;

 

Links

a:link { }
a:visited { }
a:active { }
a:hover { }

 

I shall add more as they come to my mind, if you know any more please reply and I shall add. Sorry for the bad grammar, I'm tired, I'll correct when I wake up if I have time...

image.png

"I never see what has been done; I only see what remains to be done.." - Buddha

 

| My Profile | Message Me |

image.pngimage.png

Posted

If any of you are wondering, you may think why:

text-decoration: none;

is needed for example. In reality it isn't needed and some would see it as a waste of space/bytes - however some people add it in just as a habit or to be sure that it's normal text.

[sIGPIC][/sIGPIC]

"Josh is awesome, he has the right to do whatever the fuck he wants." - Tehbyte

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...