Solved

Change background-color inside <DD>?

Posted on 2013-06-29
3
327 Views
Last Modified: 2013-07-04
Hi All,

I'm trying to change the background color of a cell.  This wouldn't normally be a problem except it's for a 3rd party website which only allows SOME tags, none of which have I've been able to use to date.

The 3rd party site allows you to type the html, and then loads it inside of a predestined DD.

Best thing I can say for asp.net is:

<dd>
   <asp:Literal />
</dd>

I have no control over the dd itself, only the asp:literal inside.  The asp literal is HIGHLY filtered,

Accepted tags are
Strong
font
ul  / il
a
p
image
headings 1 - 3

I can load a style inside it:

eg:
<p style-"background:color:black">
 
but when I do a BR or something the black won't follow through

Thanks in advanced.
0
Comment
Question by:Kyle Abrahams
[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
  • 2
3 Comments
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39287803
Try adding display block also :

<p style-"background:color:black; display:block">

Open in new window

0
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 0 total points
ID: 39287842
Didn't work.  I got the color to display for one but as soon as I hit the next <p> the display stopped working.

I ended up using an img tag with a large height (like 3000px) and then set the margin-top of my first p to -3000px

Brought the rest of the text up with it to make it appear the same.
0
 
LVL 40

Author Closing Comment

by:Kyle Abrahams
ID: 39299429
Got it on my own.  The first proposed solution didn't work for me.
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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

710 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