473,604 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Maximum width with <SPAN>

Hi, i am stuck using older ASP and have to dinamically fill a
converted-word file as a form.
Let´s suppose a row on a table has the name of someone like in a
declaration:

<span>Some random guy</span>, currently employed at ...

The problem is that the location of the next part of the line
("currently employed") varies on the length of the text inside the
span.

So i want to somehow have a maximum width on the span, so if the length
is too short
it would look like this:

Some random guy
_______________ _______________ ____________ , currently employed...

Like if it was a real life form.

I have decorated the span with text-decoration:unde rline; and tried to
set a width but this doesn't work.

Anyone has an idea, besides spending 300$ for asppdf and using PDF like
i should be?

Jun 1 '06 #1
10 8506
fj****@gmail.co m <fj****@gmail.c om> scripsit:
Hi, i am stuck using older ASP and have to dinamically fill a
converted-word file as a form.
What's a converted word? :-) Seriously, your problem description is far from
clear, and the lack of any URL makes it impossible to make good guesses of
what you are really doing. The odds are that the problem is not at the CSS
level, or that some more fundamental issues need to be settled down before
you can even specify the CSS problem in the right setting and right way.
Let´s suppose a row on a table has the name of someone like in a
declaration:

<span>Some random guy</span>, currently employed at ...
A row on a table? What has that got to do with anything?
The problem is that the location of the next part of the line
("currently employed") varies on the length of the text inside the
span.
Right. And this is a _problem_ exactly how?

Do you mean that you are trying to create a printed form using HTML and CSS?
Why?
Like if it was a real life form.
You mean a paper form? Why?
I have decorated the span with text-decoration:unde rline; and tried to
set a width but this doesn't work.
To produce a continuous line, why don't you use a sequence of underline
characters "_"?
Anyone has an idea, besides spending 300$ for asppdf and using PDF
like i should be?


Try telling the problem first.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jun 1 '06 #2
The problem is that the location of the next part of the line
("currently employed") varies on the length of the text inside the
span.
Right. And this is a _problem_ exactly how?


If the name is too long, it may cause the form to be bigger, and can't
get printed on a single page. That is a problem.
You mean a paper form? Why?
We are an insurance company, and when a client request a policy over
our website, we hand them a form so they cant print it. But since the
previous guy on the job went
and saved the word file as html, they want me to do it the same way,
and save 300$ that would cost the asppdf plugin so i could give them a
pdf form instead.
To produce a continuous line, why don't you use a sequence of underline
characters "_"?
Because you can't put text over the ____ chars, unless you use two
rows, one for the name of the guy and one for the ____ chars
Try telling the problem first.


http://mipagina.cantv.net/fleona/wordform.gif
http://mipagina.cantv.net/fleona/webpage.gif

First image is how the word file looks. No matter how long the name is,
fields will appear at the same location.

Second image shows the table designed by scratch in html. I have to use
a blank image hack in order to make the word "titular, de" appear in
the same location.

If <span> tags had a width attribute, i could set a size on it no
matter how big or short the name of the guy would be. But after
searching on this group i learned that inline tags can't have width.
And if i use display:block on spans, then it inserts new lines before
and after the span. So i would need some floating implementation.

I hope the problem is clear now, thanks for your reply

Jun 2 '06 #3
fj****@gmail.co m wrote:
The problem is that the location of the next part of the line
("currently employed") varies on the length of the text inside
the span.

Right. And this is a _problem_ exactly how?


If the name is too long, it may cause the form to be bigger, and
can't get printed on a single page. That is a problem.
You mean a paper form? Why?


We are an insurance company, and when a client request a policy over
our website, we hand them a form so they cant print it. But since the
previous guy on the job went and saved the word file as html, they
want me to do it the same way, and save 300$ that would cost the
asppdf plugin so i could give them a pdf form instead.


HTML is the wrong way to do this. If you want print forms, PDF is much
better; you don't have to buy fancy software to make PDF files, there
are free ways of doing it. ApacheFOP, for example, will create PDF files
from XSL:FO markup.

--
Jack.
Jun 2 '06 #4
Jack <mr*********@no spam.jackpot.uk .net> scripsit:
HTML is the wrong way to do this. If you want print forms, PDF is much
better; you don't have to buy fancy software to make PDF files, there
are free ways of doing it.


If I worked for an insurance company, I would not expect a $300 software
cost to be excessive.

Besides, even Word format makes more sense than HTML for a _print_ form. On
the other hand, using the Web just as a method for distributing print forms
sounds rather primitive.

Of course, one can set max-width for a <span> element. This has little to do
with the real problem, whatever it is.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jun 2 '06 #5
Jukka K. Korpela wrote:
Jack <mr*********@no spam.jackpot.uk .net> scripsit:
HTML is the wrong way to do this. If you want print forms, PDF is much
better; you don't have to buy fancy software to make PDF files, there
are free ways of doing it.


If I worked for an insurance company, I would not expect a $300 software
cost to be excessive.


Besides which, any work-around will probably incur at least $300 in
billable time in development and testing.
Jun 2 '06 #6
fj****@gmail.co m wrote:
Hi, i am stuck using older ASP and have to dinamically fill a
converted-word file as a form.
Let´s suppose a row on a table has the name of someone like in a
declaration:

<span>Some random guy</span>, currently employed at ...

The problem is that the location of the next part of the line
("currently employed") varies on the length of the text inside the
span.

So i want to somehow have a maximum width on the span, so if the length
is too short
it would look like this:

Some random guy
_______________ _______________ ____________ , currently employed...

Like if it was a real life form.

I have decorated the span with text-decoration:unde rline; and tried to
set a width but this doesn't work.


I wouldn't expect text-decoration to cover the full span. Try border-bottom.
Jun 2 '06 #7
FJ
Besides which, any work-around will probably incur at least $300 in
billable time in development and testing.


Like i said of the first message, i know i should do it with PDF,
however i am living in a third world country and the common guy here
isn't knowledgeable on computers. Almost everyone don't know anything
rather than windows, internet explorer and msn.

Requiring users to have adobe pdf installed with the browser plugin (or
another alternative) would upset our users.

Anyone, someone here commented that setting a max width is possible on
spans... How?

The only other alternative i know would be to nest tables inside
tables, as much as necessary, to set widths on the <td>'s as needed.

Jun 2 '06 #8
In article <11************ **********@u72g 2000cwu.googleg roups.com>,
FJ <fj****@gmail.c om> wrote:
The only other alternative i know would be to nest tables inside
tables, as much as necessary, to set widths on the <td>'s as needed.


To me, that sounds like the quickest and cheapest way to get the
results you want. You have a form that you want to print, and you
want it to print and display consistently always. That means all
the various parts of the form must maintain a physical relationship
with each other, both horizontally and vertically.

Anything that requires such relationships between elements is
tabular data, so using tables is appropriate, if a bit messy.

-A
Jun 2 '06 #9
To further the education of mankind, fj****@gmail.co m vouchsafed:
Hi, i am stuck using older ASP and have to dinamically fill a
converted-word file as a form.
Let´s suppose a row on a table has the name of someone like in a
declaration:

<span>Some random guy</span>, currently employed at ...

The problem is that the location of the next part of the line
("currently employed") varies on the length of the text inside the
span.

So i want to somehow have a maximum width on the span, so if the length
is too short
it would look like this:

Some random guy
_______________ _______________ ____________ , currently employed...


No, this suggests you wish to set a _minimum_ width, although you may
desire a maximum one as well.

Anyway, one way to do that would be to absolutely-position a 'random guy'
div inside a relatively-positioned 'currently-employed' div having a left
padding of the desired dimension.

--
Neredbojias
Infinity has its limits.
Jun 3 '06 #10

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

Similar topics

3
2568
by: Alexander Ross | last post by:
I have an html snippet, and I want to remove any <span> tags that have a specific attribute (class=none) ex. The quick brown <span class="animal">fox</span> jumped <span class="none">over</span> the lazy dog should become The quick brown <span class="animal">fox</span> jumped over the lazy dog
13
3391
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to <foo/>) From XHTML specification:
4
10421
by: Tristan Miller | last post by:
Greetings. Occasionally I come across sites that use something like the following combination of CSS and HTML: h1 { height:100px; width: 500px; background:url(welcome.gif) no-repeat; }
18
4352
by: Timothy Casey | last post by:
Thanks in advance... =~= Timothy Casey South Australia worloq@iprimus.com.au Formerly: casey@smart.net.au
9
6799
by: Wang, Jay | last post by:
Hello, all, I would like to enable some text between <SPAN url="http://www.testserver.com/">WORD TO BE DRAGGED </SPAN>. I put some javascript and it will extract http://www.testserver.com/ from the the span element when I select the whole text in the SPAN and drag it. However, I want to drag it without have to select the words between the span element. The default mouse action will only select the words when i move the mouse. Can...
6
2826
by: hsomob1999 | last post by:
so i have a <ul> and I allow the user to append items to it. The problem is that on mozilla the <span class="line"> which is just a line to divide the sections gets overlaped and doesnt move down and adjust to the newly added items like it does in iE. It just occured to me that i dont really have to use a span, and a html <hr> tag could do the trick -I will go try. But aside from that could some one explain why this occurs? And will I get...
6
44747
by: lilOlMe | last post by:
Hi there! I'm having a problem with a <span> element's width. I have a span element within a div block: <div class="picker"> <span id="ctl00_cph_mainContent_TPKR_Tues_LBL_TitleForPicker" class="pickerTitle">Tuesday</span> ... </div>
1
6051
by: rynato | last post by:
I have a <spanof width X px and height Y px. I want to read the text of an article, which is stored in a mySQL table, and pass to that <spanonly just enough text to fit in it, along with a 'read more' hyperlink which will take the user to the full article. I do not want any overflow scroll bars to show. The font-size is set by external stylesheet in em's. How can I determine how much text is enough? Approaches I've thought of:
5
3530
by: Brent | last post by:
Take this small HTML fragment: span.theClass{float:left;width:100px;cursor:pointer;cursor:hand;} ------------------------ <div> <span id="1" class="theClass">&nbsp;<span> <span id="2" class="theClass">Stuff in span<span> <span id="3" class="theClass"><span> </div> ------------------------
0
7929
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
8409
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...
1
8065
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8280
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
6739
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
5882
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
5441
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
3907
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
3955
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.