HomeLatest ThreadsGreatest ThreadsForums & GroupsMy SubscriptionsMy Posts
DU Home » Latest Threads » Forums & Groups » Main » Community Help (Forum) » HTML text color codes and...

Fri Sep 14, 2012, 11:29 PM

 

HTML text color codes and DU.

Ok, I've looked for the answer to my question a bit and I'm just not finding the help I desire. I would love to add some color to some text here on DU.

I know there are html codes to add before/after text to change it's color similar to the {b}---{/b}, but I just can't seem to make it work.

[font color="red" size="14" face="face"]Thanks[/font] for any help in advance!

7 replies, 5113 views

Reply to this thread

Back to top Alert abuse

Always highlight: 10 newest replies | Replies posted after I mark a forum
Replies to this discussion thread
Arrow 7 replies Author Time Post
Reply HTML text color codes and DU. (Original post)
obxhead Sep 2012 OP
Make7 Sep 2012 #1
obxhead Sep 2012 #2
Make7 Sep 2012 #3
obxhead Sep 2012 #4
treestar Apr 2017 #5
Make7 Apr 2017 #6
treestar Apr 2017 #7

Response to obxhead (Original post)

Fri Sep 14, 2012, 11:39 PM

1. Hopefully the following thread answers your question:

http://www.democraticunderground.com/?com=view_post&forum=1256&pid=1674#html_lookup_table

Styles work as well if you know CSS, but since there are so many possibilities it is unlikely I will make a table of useful code using styles. You'll need to put them in a [div] tag, the software doesn't allow the use of [span] tags (although I usually use a [font] tag like a [span] tag and it normally works fine).

ETA an example:

[font color="#000099"][font color="blue"]text here[/font][/font]

Reply to this post

Back to top Alert abuse Link here Permalink


Response to Make7 (Reply #1)

Fri Sep 14, 2012, 11:49 PM

2. Thanks!

 

I'll be honest, a lot of that reply flew right over my head, but you've given me a
[font color="blue"]great[/font] starting point.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to obxhead (Reply #2)

Sat Sep 15, 2012, 12:31 AM

3. You're on the right track...

... but "face" isn't really a valid value for the face attribute, and 14 isn't within the accepted range for the size.

You added this in the OP:

  [font color="#000066"][font color="red" size="14" face="face"]Thanks[/font][/font]

The size range is from 1 to 7 (with 3 being normal). The face attribute is for typefaces like Arial, verdana, courier, etc. If you're not trying to change the typeface, just leave the [font color="#000066"]face=""[/font] part out.

A great reference for all things web programming is w3schools. Here are more details about the attributes of the font tag: color, size, face.

Also useful on that site are the valid HTML color names and a hex number color picker.
[div style="height:1em; border-bottom: 1px solid #bfbfbf;"]

Styles are a more powerful tool for doing many of the same things that can be done with HTML tags. For example of changing the font attribute with styles:

  [font color="#000066"][div style="display:inline; color:#990000; font-size:1.385em; font-family:courier,monospace;"][div style="display:inline; color:#990000; font-size:1.385em; font-family:courier,monospace;"]text here[/div][/font]

One of the things I use styles for is to make the excerpt boxes more prominent on DU. Like this:

[div class="excerpt" style="margin-left: 2em; border: 1px solid #bfbfbf; border-radius: 0.4615em; box-shadow: 3px 3px 3px #999999;"][div class="excerpt" style="margin-left: 2em; border: 1px solid #bfbfbf; border-radius: 0.4615em; box-shadow: 3px 3px 3px #999999;"]text here[/div]

There are plenty of people on this site familiar with this stuff - so if you are trying to do something and it just doesn't work quite right, don't hesitate to ask - usually someone will be around fairly soon that can help.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to Make7 (Reply #3)

Sat Sep 15, 2012, 01:29 AM

4. WOW!

 

Yeah, I know just enough now to make myself look foolish.

I simply can't thank you enough Make7. You've answered my very basic questions and given me so much more to shoot for.

I bow to the [font color="#FF1493" size="4" face="verdana"]great[/font] and [font color="#008000" size="4" face="arial"]powerful.[/font]

Reply to this post

Back to top Alert abuse Link here Permalink


Response to Make7 (Reply #1)

Sun Apr 2, 2017, 06:36 PM

5. I tried that in a sig line

but it doesn't come out green, as instructed. I've seen other sig lines that were red. Maybe it just doesn't like green?

Reply to this post

Back to top Alert abuse Link here Permalink


Response to treestar (Reply #5)

Sun Apr 2, 2017, 08:43 PM

6. The Admins added rules to the site's stylesheet to make it so people don't override the default grey text color in signatures.

One way to get around that is to use an image as a signature - the rule there is the maximum picture dimensions are 100 pixels high and/or 400 pixels wide.

There was a discussion about all this signature stuff in the old Help & Meta-discussion forum, but now that is disappeared.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to Make7 (Reply #6)

Sun Apr 2, 2017, 08:44 PM

7. Aha, thanks!

Reply to this post

Back to top Alert abuse Link here Permalink

Reply to this thread