-
sorry freind ....but i am now learning cSS adn i dont know the ABC of css not a single thing about Css
-
-
I can give you some 
Here:
A ID is done using #, for a DIV you use div#, a class is ..
You open up CSS style inside using { you start up the individual styles using stylename(i.e. border, or w.e.):attribute;, just put one on each line, of course you don't have to put one on each line, I just find it easier to read.
General styles:
border: [width] [color] [style];
background: [color/url]; urls are done: url(urlhere)
width: [pixels wide];
height: [pixels high];
text-align: [center/left/right];
margin: [auto/pixels]; use margins for centering like "align" in HTML. note that margin-left, right, etc. can be used, as with borders, padding, and the like.
margin: auto; will center. For IE (6 only?) a tag in the BODY element of your CSS is needed, text-align: center;.
font-family: [the font, i.e. Airal, Times News Roman];
font-size: [the size, usually done with pixels or "pt". i.e. 10pt is around normal];
font-weight: [bold/bolder/lighter]; usually used for bolding of text, using a span.
opacity: [.5, .24, etc.] note that this won't work in IE (6 only?) you must use
filter: alpha(opacity=50);
color: [color]; changes the text color inside the area.
I only listed a few, but it should be enough to get you started. Ask if you have questions.
-
-
Umm... just something that might describe how someone asking for help in a coding forum is feeling. I've been there less than 4 days ago 
You are trying to code/modify your page, and realise that your knowledge about what you want to do is insuficient. You ask for help in a forum, and leave the page open. You get back to your atempts, and in less than 5 minutes you switch to forum and refresh the page. Darn, they did not even read it...
Then you get back - again - to messing with your code even more. Another 5 minutes, and you are back on forum page refrshing it again. Ah, is someone reading the post, cool, the help is on the way. Maybe now the guy is writting the answer. Another 5 minutes... Naaah, no posts on your subject.
Maybe your question was answered in the past? Let's make use of search thingie a bit. Oh, yes, there is something similar but you don't understand what the ... are they talking about. *shrug* More than that, is not identical, is just something like your problem. Let's get back to original post, maybe they answered.
Nope, no answers, but a lot of views.
C'mon, I can do it, I just need some focus. Let's try that again...
Maybe is the time zone? Sure, that must be it, the guys that usually answer the posts must sleep now. Ok, I'm going to do other things while they woke up.
etc etc etc etc
... and for the OP (I'm not even near a begginer coder, but is what I've learned using trial and error method and looking at source in different web pages):
You can have your CSS file (that's a file with css extension eg my_site.css) linked to your html document by adding (this is just an example)
<link rel="stylesheet" type="text/css" href="css/my_site.css">
between <head> and <title> tags. (that also means you need a folder "css" where you drop your "my_site.css" file)
Some basic rules:
- every element must be enclosed in {} just like you close tags in html.
- every line must end with ;
- i found this place to be priceless for the amount of information that provides: http://www.w3.org
You can set the style of how the links are shown in your page (the example below is removing the underlines from links and makes them red)
a, a:link {
text-decoration: none;
font-size: 12px;
font-family: Arial;
color: red;
}
If you want the color to change when you move your mouse over a link:
a:hover {
color: green;
}
To start a page with css first you need to define a so-called "workspace" where you will place your elements.
In my_site.css
#main_box {
width: 800px;
height: 600px;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
In index.htm file
...
<body>
<div id="main_box">
Here goes your site content
</div>
</body>
...
That made an invisble box in center of your page and at 20 pixels distance from top. Then you can add your content between the tags of "main_box" div, using the indications you received from TimFA. I strongly suggest that you visit the link I provided above, it might clear a lot of things for you.
Edit: forgot about that: Happy New Year and Merry Christmas everyone
Last edited by Rjak; 12-26-2007 at 05:01 AM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks