473,800 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.questionHeade rLabel {
margin-left:10;
top: -11px;
background-color:white;
position:relati ve;
font-size:14pt;
display: inline; }
</style>

<div class="question Div">
<p class="question HeaderLabel">TE STTESTTESTTEST TESTTESTTESTTES T
TESTTESTTESTTES T TESTTESTTESTTES T TESTTESTTESTTES T TESTTESTTESTTES T
TESTTESTTESTTES T TESTTESTTESTTES T TESTTESTTESTTES T TESTTESTTESTTES T </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 2891
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.co m/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
14735
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, behaves strangely and does not apply the background color to the padded area. And IE5 seems to ignore the hover-padding.
0
1843
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 1px on 3 sides. It looks the same in firefox and ie. Then the same box is wrapped in yet another box with a red border on the bottom. In Firefox the 'middle' box still has padding on only 3 sides, and the red border is showing on the bottom. In...
6
3648
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, which wasn't a problem with the frames. The advantage of frames is that you can have a height based on a percent of the frame, even when the frame takes up less than 100% of
3
3369
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: http://www.zen62775.zen.co.uk The code used to siaplay the hit-counter is: <img src="http://homepages.zen.co.uk/cgi-bin/counter/USERNAME/counter.num">
14
4033
by: Roger Withnell | last post by:
How to I find out what size text the browser is set to? Thanks in anticipation.
36
3053
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 get this kind of inconsistent result. -- ----------------------------------------------------------------------------- | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
3
6506
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 necessary to stop my iFrames from spaning the entire length and width of the Window, and add about 7-8mm of padding/margin to the inside of the Window. I can't figure out, whether it's adding it to the inside of the window, or the outside of the...
6
2003
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 error on them now. The error occurs when I attempt a series of SQL statements wrapped in a TransactionScope(). It's executing against a different server, so this is where it's elevated to a distributed transaction.
8
2889
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 red;'>A bunch of text</h2> </body> </html>
0
9690
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.