EasyCFM.COM ColdFusion Forums / Coding Help! / # and Colour

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: # and Colour

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

jansolo
04-14-2005 @ 12:47 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 218
Joined: Mar 2003

Hi all,

When I am using the border style (style="border: 1px solid #EFEFEF") is
there anyway of doing it so the # is not considered a variable by
coldfusion?

I know you can leave this off but in some browsers it won't display the
border (if you apply it to a td tag!!!

Thanks

Jansolo

GrowlyBear
04-14-2005 @ 12:51 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1314
Joined: May 2004

If you are using style sheets then you have nothing to worry about
if it is part of the page's code then try using ##dd3ef3

~~~~~~~~~~~~~~~~~~~
There is no place like 127.0.0.1

falconseye
04-14-2005 @ 12:53 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1033
Joined: Mar 2004

try this

(style="border: 1px solid EFEFEF")

jansolo
04-14-2005 @ 1:13 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 218
Joined: Mar 2003

Thanks matey that works!!!

Cheers

Jansolo

falconseye
04-14-2005 @ 4:59 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1033
Joined: Mar 2004

just to make a quick note.

since # is a special character indicating that the following is a variable name, you will need to escape it by another #
so, you can either use ##EFEFEF as Growly mentioned, or ####EFEFEF or ######EFEFEF as long as each # is followed by a closing#
if you do ###EFEFEF you will again get the same error...
;)

Lossed
04-14-2005 @ 5:32 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1095
Joined: Apr 2004

if you are applying it to more than one td tag, might be best to chuck it in the CSS so you can easily use it later:
in the CSS:
table td.myclass {border:1px solid #efefef}

and then in the page:

<table>
  <tr><td class="myclass"></td></tr>

---just a thought----




Lossed
---------------------------
When the only tool you have is a hammer, everything looks like a nail Smile
-----------------------------

jansolo
04-15-2005 @ 4:48 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 218
Joined: Mar 2003

Thanks to all - the ## works. The problem with using it in CSS is that
all the table cells are different!!!

Thanks for the advice as the ## trick is something that eluded me for a
long time!!!

Jansolo

drake
04-15-2005 @ 11:45 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 125
Joined: Apr 2004

Hey Jansolo,

Just a tip I guess...But im not sure how many cells you could have or how many colors you are using for those cells, but I can really only see putting them in css as a plus...because it will provide you with the ability to change those colors and styles with a couple of key strokes across you entire app...Sorry if this is something you already know but in light of the css abilities I rarely find an instance where it should not be used for layout or design...

drake

-----------------------------
-Get It Done!

jansolo
04-16-2005 @ 9:27 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 218
Joined: Mar 2003

A fair point, I usually do do that but the design is an odd one!!!

Thanks

Jansolo


Website Designed and Developed by Pablo Varando.