Solved

Change background-color inside <DD>?

Posted on 2013-06-29
3
322 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
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
How do I select this logo using CSS? 6 30
SSRS Deployment problem 5 67
asp.net open new page without popup blocker 8 19
Bootstrap 3 - Style a dropdown 1 15
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

820 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