I have a specific situation where I am applying padding to text inside of a
"P" tag, where if the text wraps then the second line of text ignores the
padding. Here is a snippet of what I am doing:
<style TYPE="text/css" TITLE="patient_info">
div.questionDiv {
border: 1px solid #CCCCCC;
width:100%;
}
p.questionHeaderLabel {
margin-left:10;
top: -11px;
background-color:white;
position:relative;
font-size:14pt;
display: inline; }
</style>
<div class="questionDiv">
<p class="questionHeaderLabel">TESTTESTTESTTEST TESTTESTTESTTEST
TESTTESTTESTTEST TESTTESTTESTTEST TESTTESTTESTTEST TESTTESTTESTTEST
TESTTESTTESTTEST TESTTESTTESTTEST TESTTESTTESTTEST TESTTESTTESTTEST </p>
</div>
The only way that I can get the wrapped lines of text to follow the padding
is if I set the display setting to 'block' instead of 'inline', but for this
situation, using a block display ruins the frame effect that I am trying to
create (as you can see). If I use a block display, the "P" tag expands to
cover the entire top portion of the frame, even if the text inside the "P"
tag is very small.
So how can I maintain the frame effect and still make wrapped text follow my
padding rule?
Jonathan
kchayka - 29 Apr 2005 12:26 GMT
> I have a specific situation where I am applying padding to text inside of a
> "P" tag,
I don't see how any padding is set by those rules you posted. It does,
however, look like you are using an odd kludge to get some kind of
visual effect, though I'm not sure what you are trying to accomplish.
Regardless, there are a few things you should do. The first is to
validate your code. This will catch any syntax errors that may be
causing display problems, and you do have errors in your code.
<URL:http://jigsaw.w3.org/css-validator/> or
<URL:http://www.htmlhelp.com/tools/>
The second is to post a URL showing a reduced test case, and describe
what you are trying to achieve. You may be going about it the wrong way,
which I suspect is the case here.
The third might be to read the specs (or a tutorial) on the CSS
properties you are trying to use. You might then see whether you are
using the appropriate properties in a logical way. I don't think you are.

Signature
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.