473,799 Members | 3,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting TEXT ONLY margins/padding in a .div

10 New Member
Right now I am currently using this:

------------------------------------------------------------
.div0 {
background-image:url(http://www.rubnip.com/Pictures/topback.gif);
background-position:center center;
background-repeat:no-repeat;
background-attachent:fixed ;
background-color:black; color:FFFFFF;
border:0px solid; border-color:grey;
padding-left:10px; padding-right:10px;
padding-top:10px; padding-bottom:10px;
width:800px; height:250px; overflow:none;
position:absolu te; z-index:2; left:50%; top:0%;
margin-left:-400px; margin-top:150px; text-align:center;
visibility:visi ble;}
--------------------------------------------------------------

The only problem is, when I use that padding setting within the divider, it also moves my background image. I just want to set a margin or padding that affects the text within the divider only, not the background image. How would this be done?

---------------------------------------------------------------
<div class="bbzConta iner">
<div class="div0">
<font size=1>Test</font>
</div>
---------------------------------------------------------------

Or maybe I can put something in there in the font tag that will affect only the text?

Any help is appreciated. :)
Nov 30 '06
12 22380
mi0sis
10 New Member
Or here is another way I guess it could be done, is there a way to limit the size of the box that the text sits within' the divider so I can make that smaller in turn making the scrollbars smaller?
Nov 30 '06 #11
mi0sis
10 New Member
OK, I have been thinking about this, and it seems what I am trying to do doesn't make sense or isn't possible. Since the overflow setting of the divider is for the divider, not the text and soon as the divider reaches its' clipping limit it creates a scrollbar for the divider, not the text.

So I think what I need to do here, is put the text within something else inside of the divider.

Is there any kind of element or tag I can put the text in, inside the divider that has a separate overflow value from that of the divider? This way I can set a dimensions for that and if my text exceeds it, it will create a scrollbar within the bounds of that element instead of the divider.

Maybe a table or something? Better yet, another divider? Actually I think I'll try overlapping a divider.

New question, do I have to set any certain command to make sure my new divider is on top of the old one and visible?

Thanks again. :)
Dec 1 '06 #12
mi0sis
10 New Member
Maybe a table or something? Better yet, another divider? Actually I think I'll try overlapping a divider.

New question, do I have to set any certain command to make sure my new divider is on top of the old one and visible?

Thanks again.
Got this to work. Everything seems to be working as I want it to. Thanks again for the help. :D
Dec 1 '06 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

1
8998
by: Mr. x | last post by:
Hello, Suppose I have a table like this : <table width = "580"> <tr align = "right" width = 760> <td id = "current_page_inner"> <font size="4" color="lightgreen" face="arial"><b><i> abc </i></b>
4
2003
by: Mike | last post by:
The following (C#) code snippet sets the text property of a label to null, then tests it for null, only to find out that is isn't. Can anyone explain why? Label1.Text = null; if (Label1.Text == null) { Label2.Text = "Is null"; } else { Label2.Text = "Is not null"; }
0
1777
by: John Dalberg | last post by:
I need to set IE's print left margin to a value smaller than the default 0.75 programmaticallly. I did some research and found some info about print templates on MSDN. However the info is too detailed and low level for my understanding. I also found an ActiveX product that costs $350/year. Any ideas or sample code on how to set the margins when a user prints in IE?
6
3550
by: one man army | last post by:
> <URL:http://developer.mozilla.org/en/docs/DOM:element.textContent> I tried setting the textContent on a trivial DIV text element. Querying the result with window.alert() shows that it worked. Yet the page does not change. Is there a clean way to update the text on the screen? d.write() d.close() causes a complete page redraw. In an application, we used to InvalRect() the affected area, or swap an offscreen buffer. ugly white...
1
1747
HansHenrik
by: HansHenrik | last post by:
Hi experts! I've made a CSS menu. {The menu contains: no images; !important} I would like to position my text close to the bottom in my list-items as in example 02 and 03. At the moment example 02 is the closest to what i want, but i can't do it without the padding and "overflow:hidden" commands.
4
1255
by: NEMA | last post by:
Hello everyone, i have a problem while setting the button text recently for my case, i would like to set the text of the button on the aspx page, i have write the code like below <asp:button id="btn_submit" text='<%# GetText("abc.xml","btn_text") %>' >
10
3094
by: maya | last post by:
hi, I'm having a problem w/bulleted lists.. as you know FF and IE do diff margins/spacing for these, so have to do stuff like /* IE: */ * html ul.headlines {margin-left:20px; margin-top:0px; } /* FF: */ htmlbody ul.headlines {margin-left:-20px; margin-top:0px; }
0
988
by: Alexnb | last post by:
I am writing a program in which there is a textbox and in it the program auto inputs a series of words, and definitions for each word. I want to make it formatted nicely to where the word is indented, and the definitions indented even more. I don't even know how to make the margins work. I have read all the documentation but just need an example so that will help. But my bigger issue is that the way I have written it is like this: for...
0
1296
by: Bill Eberle | last post by:
In Access 2007 ADP connected to SQL Server Express, most forms allow Text Format attribute of Rich Text, but a few do not. In each case the SQL Server table field connected to the Access Text Box is defined as varchar( MAX ). I see no differences between the sub forms where I'm setting the Text Format attribute to Rich Text and the sub forms where I get the error: "The setting you entered isn't valid for this property" when I try to set the...
0
9544
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
10259
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
9077
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
7570
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
6809
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
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
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
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.