ISO Image
Creator
How can I use CSS?
Jun 22 2005, 12:51 AM

Helpful Member
![]()
Group: Members
Posts: 78
Joined: 23-October 04
Member No.: 23,034
India
![]()
was just wondering how to work with css. Where do I start from
and how can I use it.
Is there a good editor, simple to use and manage to make css files
and how can I use it for invision forum.
Too many questions
but a small start will help me a lot.
Thanks

Jun 22 2005, 09:36 AM
![]()
Themer
![]()
Group: Members
Posts: 120
Joined: 17-March 05
From: England
Member No.: 29,841
United Kingdom
![]()
I would probably start by editing the size and colour of text. To do this is simple. In a text editor, preferably you need to make a random name that you want for a class name. Then in your CSS, first put a '.' without the quotes before the class name, which is very important for such a simple task as this. So just for now, let's have a class called '.bluetext'. After you have the class name put down, you then need to put a { after it. Then comes where you put the code that defines what yuo want yuor text to look like. In this example, I'm going to make the text blue, so after the { you need to put: 'color: #0000FF;'. To close the class, you need to put a } after it. It is only correct syntax to put a new line after the { and after each class style. So here is the script in full:
color: #0000FF;
}
Save it as whatever you want and as a CSS, and in notepad you will have to change the filetype that it will save as to All Files, then just add '.css' to the end of the name. To encorporate this into a different script using CSS, you will either have to link to it or import it into the script. Here are both of them for you:
Link:
Import:
@import url("/path/to/css.css");
</style>
Everytime you want text to appear in blue, you just need to use the class, which can be used in basically any tag. The most appropriate tags are probably <span>, <font> and <div>So in a basic php or html script, it will look like this:
<head></head>
<style type="text/css">
@import url("/path/to/css.css");
</style>
<body>
<span class="bluetext">This text is blue!</span>
</body>
</html>
There is so much more to CSS than this. This is just scratching the surface. Go to google and search for a CSS tutorial, because it is so easy and very effective.
-Mackins
Hope it helps
Jun 22 2005, 01:52 PM

Helpful Member
![]()
Group: Members
Posts: 78
Joined: 23-October 04
Member No.: 23,034
India
![]()
, ...
ok now want to use blue.css to colour blue, all the text in ip.php script (the final version of what is my ip) ,
how do I go about linking it to ip.php such that the colours to
ip.php text are based on bluetext.css
path to the script are
www.onlinemedicalforum.com/bfarber/ip/ip.php
path to bluetext.css =
www.onlinemedicalforum.com/bfarber/ip/bluetext.css
I am trying to make it work. ![]()
Probably I should go back to php school , where we made that script. This is confusing.
Jun 24 2005, 07:38 AM
![]()
Administrator
![]()
Group: Admin
Posts: 10,302
Joined: 9-February 03
From: Jacksonville, FL
Member No.: 1
United States
![]()
![]()
Inside the head tags that are getting sent from ip.php, add
@import url("bluetext.css");
</style>
Then in bluetext.css, say if you wanted to make all the text blue (by default, you can use span tags and such to override this directly in your ip.php file), you could do
color: #0000FF;
}
Notice I didn't have the "." and body is a regular html command? You can define basics for most any html tag in the css file, and the settings apply to that tag where-ever it is used in the final html output. So all text in the body of the html page will be blue.
Normally, you'd further override this by adding your own classes to change bg colors and text colors etc. ![]()
Go to www.w3schools.com and click on the CSS on the left hand column. Read through their tutorial.
Jun 24 2005, 09:57 AM

Helpful Member
![]()
Group: Members
Posts: 78
Joined: 23-October 04
Member No.: 23,034
India
![]()
back to school ? ![]()
ok
Feb 11 2010, 10:48 AM
Newbie
![]()
Group: Members
Posts: 1
Joined: 11-February 10
Member No.: 86,125
United States
![]()
This post has been edited by davidjoshua11: Feb 15 2010, 11:06 AM


Lo-Fi Version
Time is now: 22nd May 2012 - 10:45 AM
![]()
Webber Enhanced skin created by Im4eversmart of RuneHQ.