473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fill a box with text?

Hi there

Yet another daft question.
Can I fill a css defined box with a text character such that the box can be
set to say, 85% page width, and the text character fills the bos to that
width, does not overflow?

Graeme
Apr 9 '06 #1
2 3649
Els
Graeme wrote:
Hi there

Yet another daft question.
Can I fill a css defined box with a text character such that the box can be
set to say, 85% page width, and the text character fills the bos to that
width, does not overflow?


How about you just try and see for yourself?
Hint: leave spaces between the characters.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Apr 9 '06 #2
jim
Here's a javascript style changer I just made for ya... copy and paste
into an html file; you'll be able to click the buttons and visually see
the different effects that the style changes have on the text inside
the div box. -Jim
--------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>te xtSpacing CSS PlayGround</title>
<style type="text/css">
hr {color:white; width:70%; height:15px; text-align:center;
border-top:5px brown groove}
body {margin:5px; padding:0px; font-size:1em}
button{backgrou nd:brown; color:white; border:2px yellow ridge;
font-size:8pt; width:135px; margin-left:10px;}
ul {padding-left:10px; border-left: 5px navy double;}
li {list-style:none; margin-left:20px; margin-bottom:4px; width:290px;
padding-bottom:3px;}
</style>
</head>
<body>
<h3>
Click the buttons in different sequences to change the width and text
setup of the div box below (within the navy dashed lines)</h3>
<ul>
<li><button onClick="textho lder.style.text Align='justify' ">Justify
Text</button>
<button
onClick="textho lder.style.text Align='left'">T ext-Align:left</button></li>
<li>
<button onClick="textho lder.style.widt h='85%'">Shrink Div Width to
85%</button>
<button onClick="textho lder.style.widt h='100%'">100% Div
Width</button></li>
<li>
<button
onClick="textho lder.style.over flow='scroll'"> OverFlow-Scroll</button>
<button onClick="textho lder.style.over flow='auto'">Ov erflow
Normal(auto)</button></li>
<li>
<button
onClick="textho lder.style.over flow='hidden'"> OverFlow-hidden</button>
<button onClick="textho lder.style.over flow='auto'">Ov erflow
Normal(auto)</button></li>
<li>
<button onClick="textho lder.style.heig ht='65px'">Shri nk Div Height to
25px</button>
<button onClick="textho lder.style.heig ht='180px'">Div height
180px</button></li>
<li>
<button onClick="textho lder.style.lett erSpacing='0.5e m'">Letter Spacing
Expanded</button>
<button onClick="textho lder.style.lett erSpacing='0em' ">Letter Spacing
Normal</button>
</li>
<li>
<button onClick="textho lder.style.word Spacing='0.5em' ">Word Spacing
Expanded</button>
<button onClick="textho lder.style.word Spacing='0em'"> Word Spacing
Normal</button>
</li></ul>
<h4>The style settings for textbox below: border:1px navy dashed;
position:absolu te; left:0px; top:310px; overflow:auto</h4>
<div id="textholder " style="border:1 px navy dashed; position:absolu te;
left:0px; top:310px; overflow:auto">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam neque.
Duis cursus dapibus enim. Pellentesque habitant morbi tristique
senectus et netus et malesuada fames ac turpis egestas. Sed lorem quam,
faucibus a, porta a, vestibulum ac, enim. In
imperdiet mauris. Vestibulum mollis convallis nibh. Sed erat libero,
vulputate sed, sagittis a, faucibus id, ipsum. Vestibulum ante elit,
convallis ut, convallis id, lobortis nec, magna. Suspendisse quis urna
quis est condimentum ultricies. Integer pellentesque libero eget
sapien. Cum sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. </div>
</body>

Apr 9 '06 #3

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

Similar topics

0
3914
by: Erwin Radermacher | last post by:
Hello dear PHP users, I have a form with text boxes and a dropdown menu with names of cities The adjacent textbox fills by the help of a Javascript function. My question is, how to realize the purpose of filling the adjacent texbox for zip values. Or say it otherwise: how to transfer an array, filled with php to a Javascript function.
1
6437
by: Song Zhang | last post by:
I need to write asp/script/html code to fill the following function. 1. When a page appA.mycom.com/aa.html (aa.html code shown below) is visited from my site, a user can click the button "Launch", which launches a new window with a page from a different domain, say appB.mycom.com/bb.html. In the form myForm of aa.html, there is a field called...
6
1610
by: JeffB | last post by:
I have tried several different methods of getting a datagrid to fill with information. Below is the code I'm now using. When viewed in the browser and the text box filled with a parameter value (i.e. CA for Calif), the datagrids header is displayed when the button is clicked, but no data is displayed. I used SQL Profiler and can see that the...
0
1159
by: Peppie | last post by:
Hi, I have dropdown control on my form and after the onchange event I reload a datagrid and fill a textbox embedded in a cell with the text from the invisible next column. Unfortunately the text will not fill on postback. The data is present in the column next to the template column but the textbox will not be filled by the code beneath. I...
2
2098
by: pwh777 | last post by:
I need help in understanding the DataAdapter Fill method and how it relates to the binding to controls on a form. I have a table called tbl_CID_XRef on SQL Server. I have written as a test the simple code below: ---------------------------------------------------------------- Private cob As SqlCommandBuilder Private con As...
1
11557
by: tom c | last post by:
I am using Visual Web Developer 2005 Express Edition. I created a SQLDataSource just by draging the control to the form and filling in the blanks in the wizard. In code I need to use the SQLDataSource to load data from several tables into datasets or datatables, work with the data, then insert new rows into tables in the SQL Server...
2
4197
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is causing the error... Thanks!!! Server Error in '/' Application. ---------------------------------------------------------------------------­----- ...
1
2610
by: dellis | last post by:
Problem: My project was initially created without putting passwords in the connection string. When I added the password in the connection string, it disappears when performing a database fill. I have stepped through the code in debug and the connection string is correct up til the Fill command. Once the fill executes, the password disappears from...
1
3590
by: soms2m | last post by:
HELLO ALL, I want to fill the parent window height with respect to the sub window height which is loading using ajax (mootools). For example if the parent window height is normal and the loading child window height is 1200px (saying), when the child window load the height of the parent window changs but the backgorund color which is given 100%...
1
3456
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second set of 3 dropdown boxes be filled with the same values. thank you <head> <SCRIPT LANGUAGE="JavaScript" type="text/javascript"> var...
0
7911
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...
0
7839
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...
0
8200
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. ...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
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...
0
6610
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...
0
5390
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...
1
2345
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
0
1179
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...

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.