IPB

ISO Image Creator

Welcome Guest ( Log In | Register )

> How can I use CSS?
Cool Surfer
post Jun 22 2005, 12:51 AM
Post #1


Helpful Member
Group Icon

Group: Members
Posts: 78
Joined: 23-October 04
Member No.: 23,034
 India


Hi guys,

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 flowers.gif but a small start will help me a lot.


Thanks
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 5)
Mackins
post Jun 22 2005, 09:36 AM
Post #2


Themer
Group Icon

Group: Members
Posts: 120
Joined: 17-March 05
From: England
Member No.: 29,841
 United Kingdom


To start? hmm.gif 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:

CODE
.bluetext {
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:
CODE
<link href="/path/to/css.css" rel="stylesheet" type="text/css">


Import:
CODE
<style type="text/css">
@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:

CODE
<html>
<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 wink.gif Hope it helps
Go to the top of the page
 
+Quote Post
Cool Surfer
post Jun 22 2005, 01:52 PM
Post #3


Helpful Member
Group Icon

Group: Members
Posts: 78
Joined: 23-October 04
Member No.: 23,034
 India


Thanks mackins smile.gif , ...

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. sad.gif

Probably I should go back to php school , where we made that script. This is confusing. sad.gif
Go to the top of the page
 
+Quote Post
bfarber
post Jun 24 2005, 07:38 AM
Post #4


Administrator
Group Icon

Group: Admin
Posts: 10,302
Joined: 9-February 03
From: Jacksonville, FL
Member No.: 1
 United States


Nah, CSS is easy once you understand it. wink.gif
Inside the head tags that are getting sent from ip.php, add

CODE
<style type="text/css">
@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

CODE
BODY {
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. smile.gif

Go to www.w3schools.com and click on the CSS on the left hand column. Read through their tutorial. smile.gif
Go to the top of the page
 
+Quote Post
Cool Surfer
post Jun 24 2005, 09:57 AM
Post #5


Helpful Member
Group Icon

Group: Members
Posts: 78
Joined: 23-October 04
Member No.: 23,034
 India


flowers.gif back to school ? flowers.gif

ok
Go to the top of the page
 
+Quote Post
davidjoshua11
post Feb 11 2010, 10:48 AM
Post #6


Newbie
Group Icon

Group: Members
Posts: 1
Joined: 11-February 10
Member No.: 86,125
 United States


Well, I think is this the way saved it as whatever you want and as a CSS, and in notepad you will have to change the file type that it will save as to All Files, then just add '.css' to the end of the name. Then you have to incorporate this into a different script using CSS, you will either have to link to it or import it into the script. SEO Services

This post has been edited by davidjoshua11: Feb 15 2010, 11:06 AM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are browsing this forum (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2012 - 10:45 AM

  Page top

Webber Enhanced skin created by Im4eversmart of RuneHQ.

  Privacy Policy 1 2 3 4 5

IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here