|
|
|
|
![]() ![]() |
May 7 2007, 09:43 AM
Post
#1
|
|
|
Hidden Secrets can't be told threw just words. One must feel what the other feels to truely understand... ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,523 Joined: 8-January 06 From: Sacramento California Member No.: 16,756 |
Ok, well i have this place on my site where i use to use the <font> tag, but now im updating to start using CSS but i have no idea how to define a style like changing the font color without using <div id="IDNAME"></div> and when i use that, it screws up what i want to change colors
ANy idea what i use? lol |
|
|
|
May 7 2007, 10:07 AM
Post
#2
|
|
|
ITS ALIVE.....MUHHHAAAA ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 532 Joined: 17-October 05 From: Chippenham UK Member No.: 13,031 |
Just highlight the text you wish to change and then select the css style. Or if your doing it from the code view you can do sommet like <div class=".css_tag">content will nwo be in the css style css tag</div>
To define a font colour you can do it like this: .css_tag font-family: "Century Gothic", Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #CCCCCC; This post has been edited by CrazyRob: May 7 2007, 10:10 AM |
|
|
|
May 7 2007, 09:52 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 223 Joined: 16-January 06 From: New Zealand Member No.: 17,178 |
My biggest suggestion. Use an external stylesheet if you're not already! Makes it a heck of easier to change things.
You call the style sheet by putting in the following code into the head section of your page: CODE <link rel="stylesheet" type="text/css" href="path to your stylesheet.css" /> In your html put <div id="myfont">text text text</div> for individual and unique elements placed in a block (line-break after) or <span class="myfont">text text text</span> for several items that use the same css and placed inline (no line-break after). (As a general rule use id for unique items and class for things that repeat throughout the page. Use div for block elements and span for inline) Your stylesheet.css would then contain: CODE #myfont { font-family: Verdana, Arial; font-size: 10px; color: #ff0000; line-spacing: 11px; } Use # for unique items or . for items used repeatedly. (generally # goes with id and . goes with class) Whenever you change anything in your stylesheet it will be reflected on your page without having to change any of the html. There’s a really excellent website at http://www.cssbasics.com/ that can extend your knowledge of CSS. There’s also some excellent info on positioning at http://www.brainjar.com/css/positioning/ The WC3 has a page with lots of links for CSS: http://www.w3.org/Style/CSS/learning Here’s a Google video on creating tableless CSS layouts: http://video.google.com/videoplay?docid=-7403771606765531020 (it’s quite long so it will take a while to load. When it does, skip ahead to the 12 minute mark) but it has very good information And http://www.csszengarden.com/ is a site that demonstrates what you can do just by changing the stylesheet (without changing the html). Oh and http://www.oswd.org/ has pure CSS website templates free to download (I used these to help me get started with CSS). I would send you to my own websites but as they also use Joomla, the use of tables might be confusing. Let me know if you need any other help. I know how daunting css can be when you start out, but I have been using it for a while now to make complete css based websites and I would never go back! |
|
|
|
May 7 2007, 10:57 PM
Post
#4
|
|
|
Hidden Secrets can't be told threw just words. One must feel what the other feels to truely understand... ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,523 Joined: 8-January 06 From: Sacramento California Member No.: 16,756 |
@rob
thanks, but like i said in my post i tried that, and it made some nasty line breaks that i don't want/like @thorned rose thanks, the <span class="classname">Text</span> worked for me XD and i allready knew about the calling of the CSS but thanks |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 6th September 2008 - 08:33 PM |