Reputation: 1086
I am trying to use my <div>
element as <p>
a element.
The HTML doesn't allow this and when I try to use <p>
inside <p>
or <h1>
inside <p>
I got
my <p>
wrapper closed. (something like this <p></p><h1>blah</h1>
)
I need that my <div>
get the same behavior of my <p>
tag.
Can I do this using css style?
[UPDATE]
Just to explain, I need to do this because I am using tinymce and abcpdf.. the rendered pdf over the html has problems when text is rendered inside div.
I think that default values of the parent (in this case, the <div>
), get over not assigneds properties.
[/UPDATE]
Thanks in advance.
Upvotes: 0
Views: 1905
Reputation: 380
try to use
<span>
instead
<div>
The tag is used to group inline-elements in a document.
The tag provides no visual change by itself.
The tag provides a way to add a hook to a part of a text or a part of a document.
References:
http://www.w3schools.com/tags/tag_span.asp
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_span
Upvotes: 1