473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

One sentence beyond css.

Hi,

my *.css file contains the following line:

body {background-color: black; color: blue;}

It means that text in body will be blue. However I would like to put
one sentence in my text wich (sentence) have to have another color (not
blue). Can you tell me how it can be done?

Thank you.

Jul 23 '05 #1
5 1536
In article <11**********************@g14g2000cwa.googlegroups .com>,
op*********@yahoo.com enlightened us with...
Hi,

my *.css file contains the following line:

body {background-color: black; color: blue;}

It means that text in body will be blue. However I would like to put
one sentence in my text wich (sentence) have to have another color (not
blue). Can you tell me how it can be done?


..green {color:green;}

<span class="green">this text is green</span>

--
--
~kaeli~
If God dropped acid, would he see people?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
op*********@yahoo.com wrote:

Hi,

my *.css file contains the following line:

body {background-color: black; color: blue;}

It means that text in body will be blue. However I would like to put
one sentence in my text wich (sentence) have to have another color (not
blue). Can you tell me how it can be done?

Thank you.


I would strongly urge you not to have blue text against a black
background. It's almost unreadable. While aqua provides much
better contrast than blue against a black background, it might
still create problems for anyone who is colorblind.

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
Jul 23 '05 #3
kaeli wrote:
.green {color:green;}
That doesn't really seperate structure and content from the presentation
does it, it simply stacks another layer on top of it. What happens when
the author decides to use a new theme and green is no longer
appropriate? Should all the markup be changed to match, or just the CSS
(which would make it inconsistent and confusing.)

eg.
..green { color: red; } ???

<span class="green">this text is green</span>


It depends what you are trying to markup, not what you want it to look
like. If, for example, you want emphasis to be shown in green, you
could use

<em>emphasised text</em>

em { color: green; }

http://www.w3.org/QA/Tips/goodclassnames

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #4
me
"Lachlan Hunt" <sp***********@gmail.com> wrote in message
news:42***********************@per-qv1-newsreader-01.iinet.net.au...
kaeli wrote:
.green {color:green;}


That doesn't really seperate structure and content from the presentation
does it, it simply stacks another layer on top of it. What happens when
the author decides to use a new theme and green is no longer
appropriate? Should all the markup be changed to match, or just the CSS
(which would make it inconsistent and confusing.)

eg.
.green { color: red; } ???

<span class="green">this text is green</span>


It depends what you are trying to markup, not what you want it to look
like. If, for example, you want emphasis to be shown in green, you
could use

<em>emphasised text</em>

em { color: green; }

http://www.w3.org/QA/Tips/goodclassnames

--
Lachlan Hunt


After reading the link I see your suggestion is quite good. If someone
wanted a special one time only style I would add the following:

..special { font-weight: bold; color: #FF0000}

I would add this comment to the style:

/* color red emphasis bold */

I would then add this to the body:

<span class="special">Bold Red Text</span>

If needed I would adapt the comment to describe any additional formattting
too, of course this is all OT in this NG. ;-)
Signed,
me
Jul 23 '05 #5
In article <42***********************@per-qv1-newsreader-01.iinet.net.au>,
sp***********@gmail.com enlightened us with...
kaeli wrote:
.green {color:green;}


That doesn't really seperate structure and content from the presentation
does it, it simply stacks another layer on top of it. What happens when
the author decides to use a new theme and green is no longer
appropriate? Should all the markup be changed to match,


Well, I do.
*shrugs*

Then again, I actually keep everything in one document (one CSS and one html
template), so it's not hard to.

--
--
~kaeli~
Every calendar's days are numbered.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: lkrubner | last post by:
Last year I asked a bunch of questions about character encoding on this newsgroup. All the answers came down to using ord() in creative ways to try to make guesses about multi-byte characters. I...
1
by: Christian Buck | last post by:
Hi, i'm writing a regexp that matches complete sentences in a german text, and correctly ignores abbrevations. Here is a very simplified version of it, as soon as it works i could post the...
14
by: Alex | last post by:
Hi, I have a question regarding to string variable. Please look at below example. ------------------------------ #define STR "ABC" char *testStr testStr = STR;
6
by: mike | last post by:
Hello, I am trying to write some code to parse a sentence and hyperlink just the words in it. I used Aaron's code from an earlier question as a start. So far, all the code does below is...
4
by: wohast | last post by:
Hi, I'm stuck at the very beginning of my current assignment. I just need a little help getting started, and then I know how to do everything else. ask user: "Please enter your name followed by...
12
by: jackson.rayne | last post by:
Hello, I am a javascript newbie and I'm stick at one place. I have a requirement where I will get a sentence in a variable example var v1 ="This is a sentence"
19
by: fellya | last post by:
Hi, i don't have enough experience in writing codes in Python but now i'm trying to see how i can start using Python. I've tried to write a simple program that can display a sentence. now my...
1
by: fellya | last post by:
Hi, i don't have enough experience in writing codes in Python but now i'm trying to see how i can start using Python. I've tried to write a simple program that can display a sentence. now my...
2
by: mike Andrews | last post by:
I am trying to remove every other letter from a sentence that I input just by using a for loop. This code however just reprints the sentence def removeLetter(sentence): index=0 for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.