Jump to content
xisto Community
Sign in to follow this  
Albus Dumbledore

Help With Css

Recommended Posts

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 colorsANy idea what i use? lol

Share this post


Link to post
Share on other sites

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;

Edited by CrazyRob (see edit history)

Share this post


Link to post
Share on other sites

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:


<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:


#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://forums.xisto.com/no_longer_exists/ Here�s a Google video on creating tableless

 

CSS layouts: http://forums.xisto.com/no_longer_exists/ (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! :unsure:


Share this post


Link to post
Share on other sites

@robthanks, but like i said in my post i tried that, and it made some nasty line breaks that i don't want/like@thorned rosethanks, the <span class="classname">Text</span> worked for me XD and i allready knew about the calling of the CSS but thanks :unsure:

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.