Solved

Change background-color inside <DD>?

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

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 39

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

746 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

16 Experts available now in Live!

Get 1:1 Help Now