Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search
 

obxhead

(8,434 posts)
Fri Sep 14, 2012, 11:29 PM Sep 2012

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 = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
HTML text color codes and DU. (Original Post) obxhead Sep 2012 OP
Hopefully the following thread answers your question: Make7 Sep 2012 #1
Thanks! obxhead Sep 2012 #2
You're on the right track... Make7 Sep 2012 #3
WOW! obxhead Sep 2012 #4
I tried that in a sig line treestar Apr 2017 #5
The Admins added rules to the site's stylesheet to make it so people don't override the default grey text color in signatures. Make7 Apr 2017 #6
Aha, thanks! treestar Apr 2017 #7

Make7

(8,543 posts)
1. Hopefully the following thread answers your question:
Fri Sep 14, 2012, 11:39 PM
Sep 2012
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]
 

obxhead

(8,434 posts)
2. Thanks!
Fri Sep 14, 2012, 11:49 PM
Sep 2012

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.

Make7

(8,543 posts)
3. You're on the right track...
Sat Sep 15, 2012, 12:31 AM
Sep 2012

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

 

obxhead

(8,434 posts)
4. WOW!
Sat Sep 15, 2012, 01:29 AM
Sep 2012

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]

treestar

(82,383 posts)
5. I tried that in a sig line
Sun Apr 2, 2017, 06:36 PM
Apr 2017

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?

Make7

(8,543 posts)
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.
Sun Apr 2, 2017, 08:43 PM
Apr 2017

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.

Latest Discussions»Help & Search»DU Community Help»HTML text color codes and...