Things to Know

1. Indented Structure

Your HTML is likely to have a lot of parts: divs, headings, paragraphs, lists. Each of these parts has an opening and closing tag.

Although indenting will not affect how the page loads, it will make the code a lot easier to read.

So: Indent one tab when you start a new element that is a child element of the tag above it. Then move back in a tab when you close that element.

This will allow you to see very clearly what content is being affected by a parent element, and also make sure you have closed all your tags.

  • Alphabetized
  • Tabbed attributes
  • Consistent spaces and breaks

2. Structure

This isn't content structure, but a way to organize your CSS so that you can read it easily and find the elements you want to change later.

Use comments to create sections in your CSS. There is no one right way to do this, some people just separate the reset from custom code, others create sections based on the divs in their HTML, others alphabetize. The idea is to make is easy for you and others to read the file.

Some designers recommend separating your layout styles from other styles. This is called "Future Proofing," which means that as CSS evolves, you'll be able to change the key elements - the layout, fairly easily.

Also, use white space to make your files legible. It does add a little weight to your file, but not enough to make it worth sacrificing readability.

3. Comments

Aside from using comments to give your CSS file structure, use them to explain what you're doing with your CSS code.

You can also use comments to remind yourself when elements are being affected by parent elements.



Using designer comments helps you remember what is doing what and will cut back the time it takes you to code/fix/edit your layout.

4. Miscellaneous

As with your HTML, validate your CSS. There are online validaters that will point out any incorrect text within your coding. Using these validaters will help you become more fluent in HTML/CSS. A little unnecessary for someone who just codes every once in awhile, but for anyone interested in making web design a passion of there's correct coding is a must and a good skill to have.

These are just a few ways that you can keep your CSS legible by both humans and browsers. Clean code means fewer bugs, easier editing and faster page loads. Of course, nothing can beat a formal education in HTML, CSS and web standards.

Top of page


The Basics

Top of page


Advanced - Font Size, Color & Face

Font size 1
Font size 2
Font size 3
Font size 4
Font size 5


Change the "3" to the font size you want. The higher the number the bigger the text. "1" is the smallest font size using this method of changing font size. Remember to choose a font size that is not too small for people to read.

Css For You
Css For You
Css For You
Css For You

To change the color of text replace the "#35c0e2", known as a hex code, with the hex code of your color. A hex code is just a line of number/letters that form the action of a color. Ex. #35c0e2 is a light blue. Some colors can be used by simply just typing there name in. Such as "red". Always make sure the color is light/dark enough for people can actually read it without straining there eyes.

Css For You.
Css For You.
Css For You.
Css For You.

To change to a different font face, replace "Georgia" with the font face of your choice. Three of the most common used font faces are Georgia, arial, and century gothic. If a person does not have a certain font downloaded on there computer then they will not see it. So when choosing a font face try and choose default fonts. Also keep in mind weather the font is legible or not.

Css For You
Css For You
Css For You


You can mix and match font sizes, colors and faces as you please. Just add the action after the word "font". Do not forget to use quote marks and equals. Also remember before every hex code you have a "#.

Top of page


Advanced - Style Tags

From here on out some codes may need to be placed in "style tags". The style tag is used to define style information. In the style element you specify how HTML elements should render in a browser.



Remember to match the tags. For every opening style there must be a closing. Typically you will only have one set of style tags.

Top of page

Advanced - Uploading, Linking & Adding Borders to Photos

Uploading

1. Go to a hosting site such as tinypic, phototbucket, or image shack. (I personally use tinypic)
2. Click the "Browse" button
3. Click on the image you want to up lode
4. 4 codes will show up copy the "direct Link for Layouts" (4th one down if you are using tinypic)
5. Paste the copied code in between the quotation marks in the code below.



6. Paste on profile and your done.

EX.

Linking

To link and image copy and paste the URL of where you want the page to link to and past it where it says URL HERE in the code below. Remember to replace my direct link with the direct link to your image.



EX. Css {For:You;}

Adding a Border

To add a border you need to add border="#. Replace the # with how thick you want the border. 1 being the thinnest.



EX.

Changing opacity

This will make all the images either 1) On hover turn transparent or 2) Be already transparent and turn solid when hovered.

Transparent on Hover


Solid on Hover

Top of page

Advanced - Mouse

To change the way your mouse you have to make (or find) the image you want to replace your mouse with.

This code goes in style tags.

Put the URL of the image you want between the parentheses.

Top of page

Advanced - Link Decorating



That is the code for a normal link. Change URL HERE to the url of the page you want to link too and change the "link name" to what ever you want the link to be called.

EX. Neopets.com

The link will style however you have it styled in the style tags. If you do not have anything in the tags it will become the default blue link.

Different link style examples:
  • color:96e24b
  • font-family: arial
  • font-size:9pt
  • letter-spacing: 0px
  • font-weight: normal
  • text-transform: uppercase
  • background-color: transparent
Most are self explanatory such as font-size or letter-spacing. Others may be more difficult to figure out there purpose. Here's a quick explanation of a few trick ones:

font-weight: Font weight tells whether or not the link will be italicized, bolded, or underlined. By putting "normal" the link will have none of those traits.

text-transform: This is to tell weather you want the links to be all "uppercase" or all "lowercase" if you simply just want normal text you can wither delete it or put "none".

padding: Padding has 5 different styles:
  • padding-left:
  • padding-right:
  • padding-top:
  • padding-bottom:
  • padding:
Padding causes an indent on the text only unlike margin which moves everything.

margin: Margin will make a indent with the whole link. Background and everything. Like padding margin has the same 5 styles.

display: block display: block will make it so that your links sit on top of each other (ie. like blocks)

The best way to get used to and learn link styles is to just endearment. Change codes see what happens when you change an attribute or add one.

To style a link you plan to use multiple times you would put this in your style tags:

link

Hover


and post this code where you need the link to show up:



For something more specific like a navigation you would place this in between style tags:

link

Hover


See the "nav" at the beginning? you can change that to whatever you like as long as you stay consistent. So if you change "nav" to "link1" then you would have to change nav on the hover code and to the link.

This is the link you would use with the code above:

Top of page

Advanced - List

Lists are very east. Just copy and past that code to where you want the list and fill in your information.

Top of page

Advanced - page anchors

The navigation system links on this page are all page anchors. Anchors are links within one page, transferring you to a particular place in that page. You click on the title of the chapter at the top of the page, and you immediately go to that chapter without having to scroll down the page. This can be very handy in long petpages for example.

Anchors are also links, so the coding for those is very familiar to the coding of a link.

Where you want the link to the particular place on the page to be (in our case, the navigation system), you put the following:



You also need to put a html code at the place the link directs to. This code should have the same codeword as the link has, that way they are connected. Where you want the link to direct to you put the following code:



You can replace 'CODEWORD' with anything you like, as long as the codeword in the link is he same as the codeword in the code at the place the link directs to. If your codeword isn't the same your link will not work.

Top of page

Advanced - Background

All these codes go between style tags.
If you want to make your background fixed, no repeat, and in the bottom right hand corner then you would take the background code you are adjusting, in our case we will adjust body {background:url(URL);}, and you add background-attachment:fixed; , background-repeat:no-repeat; , and background-position: bottom right; to the code so it now looks like this:

body {background:url(URL);background-attachment:fixed; background-repeat:no-repeat;background-position: bottom right;}

You can do things like this to any code that involves backgrounds. Here are some other things you can change:

Top of page

Advanced - Scrollbars

All these codes go between style tags.
Just place your hex color codes to coordinate with how you want it the scrollbar to look. Remember that scrollbar customizations only apply in Internet Explorer.

BODY{
scrollbar-face-color: #2DBEE8;
scrollbar-shadow-color: #2DBEE8;
scrollbar-highlight-color: #2DBEE8;
scrollbar-3dlight-color: #2DBEE8;
scrollbar-darkshadow-color: #2DBEE8;
scrollbar-track-color: #2DBEE8;
scrollbar-arrow-color: #1C1C1C
}




Code


Overflow Options

These attributes will tell weather or not the scroll box will actually scroll or not.
visible
Default Content is not clipped and scroll bars are not added.
scroll
Content is clipped and scroll bars are added, even if the content does not exceed the dimensions of the object.
hidden
Content that exceeds the dimensions of the object is not shown.
auto
Content is clipped and scrolling is added only when necessary. So your code would look like this:

overflow: auto;

You would put it with the other commands for that DIV. For example:

#aboutme {
background-color:transparent;
width: 470px;
position:absolute;
margin-top:350px;
margin-left:-330;
text-align:justify;
font-size: 8pt;
overflow: auto;}

Top of page

Advanced - DIV Boxes

There are two different ways you can create a DIV box. As of now (Oct. 11, 2009) the word position is not being allowed. So we can no longer use Cascading Style Sheets for now, but we can use Inline Styles to get the word position past the filter so that are lookup will be functual. We will talk about Inline Style Tags first.

Inline Style Tags

Inline styles are where, instead of putting your specifications in the style sheet, you put them in the body.



You don't have to move any of the allowed style words you have for "aboutme in your style sheet. They can stay right where they are, since you still have id="mybox" in there.

Cascading Style Sheets

Cascading Style Sheets are what is most commonly used in coding anything. They are more organized and easier to edit and read, but thanks to TNT new filter at this time we can not use them. But just incase we can use them again one day I will explain how they work.



See how the "postion:absolute;" is in the style tags instead of in the DIV tag? That's really the only difference. If you code layouts or websites for another site other than neopets it is better to use this method instead of the above one.

Changing the look

To change the look and position of a DIV you do very similar codes to how you link decorate. Here is an example of what it might look like:

#aboutme {
background-color:transparent;
width: 470px;
height: 500px;
top:350px;
text-align:justify;
font-size: 8pt;
overflow: auto;
}

Many people would rather the DIV not scroll. To do this set the overflow to auto (overflow: auto;) and the height to autopx (height: autopx;)

remember that the "aboutme" can be changed to whatever you would like the DIV to be called. They have to match up though. EX:

#goals {
background-color:transparent;
width: 470px;
height: 500px;
top:350px;
text-align:justify;
font-size: 8pt;
overflow: auto;
}

div id="goals"
text text text
/div

Top of page

Advanced - Image Resizing

Sometimes your images just wont fit where you want them to. Be it a scrollbox or a div, it's a hassle to resize the image in an image program right? Well here's a simple code that will do it for you:
replace "http://i35.tinypic.com/eam43a.png" with your own image url



It's perfect because it will make this large picture:



Icon size!



You can change the dimensions in the code to get the picture just the way you need it.

Top of page

Advanced - Wrap Around Text

Wrap around text can be useful when you have just a little image you want to put up, but don't want to break your body of text up. This trick is great for stories, about me's, and any other instance where you have a large body of text. Example:

So as you can see the all the text will go to the right of the image, in which case the icon. Could this be the product of black magic? No my fine friends 'tis simple HTML. Oh, yes I know this may startle and amaze some, but I assure you what is happening here is purely natural, and you need not be frightened. Lulz, remind me to never type like that again. Kthxbye. So as you can see the all the text will go to the right of the image, in which case the icon. Could this be the product of black magic? No my fine friends 'tis simple HTML. Oh, yes I know this may startle and amaze some, but I assure you what is happening here is purely natural, and you need not be frightened. Lulz, remind me to never type like that again. Kthxbye. So as you can see the all the text will go to the right of the image, in which case the icon. Could this be the product of black magic? No my fine friends 'tis simple HTML. Oh, yes I know this may startle and amaze some, but I assure you what is happening here is purely natural, and you need not be frightened. Lulz, remind me to never type like that again. Kthxbye. So as you can see the all the text will go to the right of the image, in which case the icon. Could this be the product of black magic? No my fine friends 'tis simple HTML. Oh, yes I know this may startle and amaze some, but I assure you what is happening here is purely natural, and you need not be frightened. Lulz, remind me to never type like that again. Kthxbye.

Left:

Right:


Replace my Willy Wonka icon with your image URL

Top of page

Neopets - Hide Codes

All these codes go between style tags.

Top of page

Neopets - Lookup Sections

All these codes go between style tags.

Top of page

Neopets - Fonts/Links

All these codes go between style tags.

Other things you can adjust

There are lots of other things you can add into the base codes to adjust certain things in the codes.

For example, if you want to change the font-size of your links and make them bold, then after the #main a {color:COLOR;}, you would add in the code font-size:14pt; and font-weight:bold;, so your code would now look like: #main a {color:COLOR; font-size:14pt; font-weight:bold;}

You can do this to any of the above font/link codes.

Top of page

Neopets - Graphics/Images

All these codes go between style tags.

Top of page

Neopets - Editing Content Modules

All these codes go between style tags.
This will show you how you would edit size, background color, text color, etc. of the content modules on your lookup.

Here's an example. Lets say I wanted a smaller user collections (module that contains avatar, stamp, site theme count):

#usertrophies{ width:250px; height:autopx}

That is what it would look like. The "height:autopx" indicates that there will be no set height, but the module will only be 250px wide. You change the "250" to your desired module width.

All Module Names

#userneopets
#usertrophies
#usercollections
#usershop
#userinfo td.medText

Now if you wanted to hide any of these modules you would simply put {display:none;} after it.

Need help?
Top Of Page
Go Home



NEOPETS, characters, logos, names and all related indicia
are trademarks of Neopets, Inc., © 1999-2009.
® denotes Reg. US Pat. & TM Office. All rights reserved.

PRIVACY POLICY | Safety Tips | Contact Us | About Us | Press Kit
Use of this site signifies your acceptance of the Terms and Conditions