Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

css and dynamic value

Posted on 2010-09-18
5
Medium Priority
?
382 Views
Last Modified: 2012-05-10
Hello

I have this and it works fine

<table width="567" border="0" cellpadding="5" cellspacing="0" <% Response.Write(" style='background-color:" & myColor & "'") %>>

I need to add to the style margin-bottom:25px;

I have tried below but I get errors.

<table width="567" border="0" cellpadding="5" cellspacing="0" <% Response.Write(" style='background-color:" & myColor &;margin-bottom:25px;"'") %>>

I would be grateful if anyone can enlighten me a little on how to not get the errors hehe.

thanks for any help

k
0
Comment
Question by:thatelvis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
tobzzz earned 2000 total points
ID: 33707625
Hi thatelvis,

Try this instead:
<table width="567" border="0" cellpadding="5" cellspacing="0" style='background-color:<%=myColor%>;margin-bottom:25px">

/ Tobzzz
0
 
LVL 1

Author Comment

by:thatelvis
ID: 33708554
thank you tobazz

that didnt work

this works

 <table width="569" border="0" cellpadding="5" cellspacing="0" <% Response.Write(" style='background-color:" & myColor & "'") %>>  

but how to add this to it is a bit of a pain

margin-bottom:25px


cheers

k
0
 
LVL 1

Author Comment

by:thatelvis
ID: 33708718
ok got it

<table width="569" border="0" cellpadding="5" cellspacing="0" style="background-color:<%= myColor %>; padding-bottom:10px;">


thanks for your help

k
0
 
LVL 1

Author Closing Comment

by:thatelvis
ID: 33708756
thanks a milion you put me in the right direction any way. it was style='background-color:<%=myColor%>;margin-bottom:25px"> you gave me but it should have been style="background-color:<%=myColor%>;margin-bottom:25px">

Haha just missing a inverted comma just a well i was not missing a semi colon  as my wife wouldnt know what to think.
0
 
LVL 11

Expert Comment

by:tobzzz
ID: 33708894
Ah yes, pesky inverted comma - pleased to help!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question