steva
asked on
Applying an inline style that applies to child elements
I have an application where people can create text boxes and enter text. Each account has it's own set of styles in the account DB record, which are applied to each box when it it created:
.
These go into an inline style attribute of the element: style = "...."
This works find for styling the box itself, but now I'd like to style the paragraphs that will go in the box. So when I create the box I'd like to also specify that all paragraphs that go into the later will, for example, have a top margin of 20px. I need to implement a div p { } from an inline style attribute, because I have no CSS file to put this into. So, is there any way to specify in an inline style attribute that a particular style applies not to the element that contains the attribute, but to children of the element, so it operates like a div p?
Thanks for any ideas.
.
These go into an inline style attribute of the element: style = "...."
This works find for styling the box itself, but now I'd like to style the paragraphs that will go in the box. So when I create the box I'd like to also specify that all paragraphs that go into the later will, for example, have a top margin of 20px. I need to implement a div p { } from an inline style attribute, because I have no CSS file to put this into. So, is there any way to specify in an inline style attribute that a particular style applies not to the element that contains the attribute, but to children of the element, so it operates like a div p?
Thanks for any ideas.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER