Solved

css and dynamic value

Posted on 2010-09-18
5
374 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
  • 3
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
tobzzz earned 500 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now