Solved

Change background-color inside <DD>?

Posted on 2013-06-29
3
328 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

636 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