473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Applying padding to wrapped text - for a frame effect

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
Jul 21 '05 #1
1 2867
Jonathan wrote:
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.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Thomas Mlynarczyk | last post by:
Hello, I want to style an <a> element to have a special padding on "hover", like a {padding: 3px 5px 2px 4px;} a:hover {padding: 2px 4px 3px 5px;} No problem for Mozilla. Opera 7, however,...
0
by: Red | last post by:
This is apparently an ie display bug, I can't seem to figure out which ie bug this is. a 3 sided border is created by wrapping the 'inner' box in the 'middle' box and padding the 'middle' box...
6
by: lkrubner | last post by:
I've come up with a non-frame version of this site: http://www.lauradenyes.com/ However, the owner doesn't like my version because the content in the center sits too high in the center part,...
3
by: Armand Karlsen | last post by:
Is it possible to apply the same styling code as is used on my web page to a CGI-based hit-counter, where the script is a pre-made one supplied by the ISP? The webpage in question is:...
14
by: Roger Withnell | last post by:
How to I find out what size text the browser is set to? Thanks in anticipation.
36
by: phil-news-nospam | last post by:
Here is a simpler (no drop shadows) example of the padding bug I see: http://phil.ipal.org/usenet/ciwas/2006-05-08/buttons-1.html So far I find nothing in the CSS2 document that says I should...
3
by: Daz | last post by:
Hi everyone. I have just been making a JavaScript chat applet, which should open in a new child window. It does all of this fine, and works within Firefox beatifully. However, IE thinks it's...
6
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
Hi - I have 4 webservers in my webfarm. All Win2k3 web edition. Before yesterday, none of them were service packed. I have now applied SP2 to two of them, and I'm getting a very weird MSDTC...
8
by: rodeored | last post by:
page: http://reenie.org/test/blockpadding.htm code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>test</title> </head> <body> <h2 style='padding:0; border:solid 1px...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.