Solved

css and dynamic value

Posted on 2010-09-18
5
376 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 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

13 Experts available now in Live!

Get 1:1 Help Now