473,382 Members | 1,390 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,382 software developers and data experts.

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 3623
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.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>textSpacing 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{background: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="textholder.style.textAlign='justify'">Jus tify
Text</button>
<button
onClick="textholder.style.textAlign='left'">Text-Align:left</button></li>
<li>
<button onClick="textholder.style.width='85%'">Shrink Div Width to
85%</button>
<button onClick="textholder.style.width='100%'">100% Div
Width</button></li>
<li>
<button
onClick="textholder.style.overflow='scroll'">OverF low-Scroll</button>
<button onClick="textholder.style.overflow='auto'">Overflo w
Normal(auto)</button></li>
<li>
<button
onClick="textholder.style.overflow='hidden'">OverF low-hidden</button>
<button onClick="textholder.style.overflow='auto'">Overflo w
Normal(auto)</button></li>
<li>
<button onClick="textholder.style.height='65px'">Shrink Div Height to
25px</button>
<button onClick="textholder.style.height='180px'">Div height
180px</button></li>
<li>
<button onClick="textholder.style.letterSpacing='0.5em'">L etter Spacing
Expanded</button>
<button onClick="textholder.style.letterSpacing='0em'">Let ter Spacing
Normal</button>
</li>
<li>
<button onClick="textholder.style.wordSpacing='0.5em'">Wor d Spacing
Expanded</button>
<button onClick="textholder.style.wordSpacing='0em'">Word Spacing
Normal</button>
</li></ul>
<h4>The style settings for textbox below: border:1px navy dashed;
position:absolute; left:0px; top:310px; overflow:auto</h4>
<div id="textholder" style="border:1px navy dashed; position:absolute;
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
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...
1
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",...
6
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...
0
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...
2
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...
1
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...
2
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...
1
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...
1
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...
1
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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...
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...

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.