473,624 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting Prob: Span Moves Outside Containing DIV

Hi.

I have been wrestling with getting a span (or a few)
to live inside a few divs. I want to put padding around
the span but it seems to move independent of the divs
even though there is no float. I am wondering if display:block
is messing stuff up? Or, something else?

do you see what I am doing wrong?

thanks.

Code:

<div style="display: block;" class="bluePane l" width="100%"
tabcolor="blue" panelurl="http://localhost:2032/Site/Tabs.aspx"
id="panel_today ">
<div>
<span style="padding: 5px; background-color: white;">one</span>
<span>two</span>
<span>three</span>
<span>four</span>
</div>
</div>

the bluePanel CSS:

Code:

.bluePanel
{
background: #acc6d5;
padding-left:5px;
border: 1px solid black;
border-top: 0px;
}
Edit/Delete Message

Apr 25 '07 #1
2 3713
pbd22 wrote:
I have been wrestling with getting a span (or a few)
to live inside a few divs. I want to put padding around
the span but it seems to move independent of the divs
even though there is no float.
Unfortunately, I don't understand your problem. What do you mean, "it
moves?" The padding appears for me, but the content of the span remains
inline, as is its wont. I don't see what "moves."
I am wondering if display:block is messing stuff up?
Shouldn't oughta. A DIV is display:block by default.
Or, something else?

do you see what I am doing wrong?
No, but again, I don't understand the question. I've pasted your code
into a file of my own and done some "testing" but I'm not sure what I'm
looking for. That said, I'm thinking you may not have tried to validate
the code. Visit http://validator.w3.org/ for the HTML,
http://jigsaw.w3.org/css-validator/ for the CSS.

You might also try it with a simplified test case, one which doesn't
have a bunch of Java in it, for example.
>
Code:
As always, a URL is preferable to pasted, incomplete code.
>
Edit/Delete Message
Is this your sig? Catchy ;-)

HTH
--
John
Apr 25 '07 #2
pbd22 wrote:
>
I want to put padding around
the span but it seems to move independent of the divs
even though there is no float.

Code:
Don't post code, post a URL. If your domain isn't publicly available,
find someplace else that is and upload a test page there. Most ISPs give
their users some amount of free web space, and there are free servers
like yahoo/geocities if you're desperate.

Make it easy for people to help you and you'll get a better response.
Posting code is not the way, posting a URL is.

--
Berg
Apr 25 '07 #3

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

Similar topics

4
2392
by: Dan Weeb | last post by:
Hi All, I have struggled through this far with help from many of you so thanks. I am stuck again. I am really new to this so don't be harsh :-) There are a few problems. You can run the script here http://www.pbrown.com/research/test1.php to see the formatting issues Formatting Issues
0
1484
by: Darin McGrew | last post by:
Eric Meyer's <http://www.meyerweb.com/eric/css/inline-format.html> is very clear that it is not a simple introduction to the inline formatting model. Unfortunately, that's what I think I need. I understand the desired behavior: parent inline elements should not stretch in height to fit nested child inline elements that are taller than the parent. What I'm missing is the "why", the rational behind this behavior that will help me make...
3
39715
by: ShadowMan | last post by:
Hi all I have something like <DIV style="border: 1px solid black"> <SPAN>left side text</span> <span>right side text</span> </div> Using CSS I would like to aling first SPAN on left and second SPAN (on the same line) on right side. Using float property I can do it but, text appears outside DIV border.
6
2469
by: Timo | last post by:
I have this list of checkboxes displaying properly in Opera and IE, but cannot get it in Firefox. For some reason, in FF, the checkboxes creep farther and farther to the right across the page, with each successive line: This is item one This is item two This is item three This is item four I would be grateful for some pointers on what's causing it and what I can do
12
2345
by: dmieluk | last post by:
Problem: When moving between records, I need to control which combo/text boxes are displayed on the current form, dependent upon data in the current record. More: I building my first access database.
7
15646
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is there an equivalent property for the DataGridView? I have searched, but have not found one. I would like the user to be able to see all the columns of the table on one screen - thus eliminating the need to use the horizontal scroll bar to view...
11
2425
nathj
by: nathj | last post by:
Hi, I am working on new version of a site that requires an application form for membership, this is so that certain features of the site are only available to members. The site is aimed at Church Leaders and requires a lot of information from them. I have two questions relating to form layout and formatting. 1) How do you remove the border from a text area? 2) How do you format an input text field to display a date format of dd/mm/ccyy?...
1
1383
by: Josiwe | last post by:
I have a search program that returns an HTML string which I display to the user. I want to highlight the search terms. However a simple search and replace on the HTML causes problems. If the user searches on Georgia and I get back this: <div style="font-name:Arial">Georgia, Alabama, and Louisiana</div> It works fine: <div style="font-name:Arial"><span style="background- color:yellow;">Georgia</span>, Alabama, and Louisiana</div>
1
1626
by: malathib | last post by:
Hi, I am facing a problem in using iframes. For example..<h2><font color="blue"><span class="article-title">Translation</span></font></h2><span class="subtitle">Malathi is a name</span> if i am selecting the part "Translation Malathi" and applying any formatting (for suppose center align) to that then after saving, it is inserting extra tags as follows so that the entire text in <span class="subtitle"> is also getting changed according...
0
8249
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
8179
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8633
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
8493
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
5570
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
4084
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
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.