HighDots Forums  

Maximum width with <SPAN>

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Maximum width with <SPAN> in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
fjleon@gmail.com
 
Posts: n/a

Default Maximum width with <SPAN> - 06-01-2006 , 09:04 AM






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:underline; 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?


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-01-2006 , 05:01 PM






fjleon (AT) gmail (DOT) com <fjleon (AT) gmail (DOT) com> scripsit:

Quote:
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.

Quote:
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?

Quote:
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?

Quote:
Like if it was a real life form.
You mean a paper form? Why?

Quote:
I have decorated the span with text-decoration:underline; 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 "_"?

Quote:
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/



Reply With Quote
  #3  
Old   
fjleon@gmail.com
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 08:25 AM




Quote:
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.

Quote:
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.

Quote:
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

Quote:
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



Reply With Quote
  #4  
Old   
Jack
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 10:29 AM



fjleon (AT) gmail (DOT) com wrote:
Quote:
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.


Reply With Quote
  #5  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 11:18 AM



Jack <mrdemeanour (AT) nospam (DOT) jackpot.uk.net> scripsit:

Quote:
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/



Reply With Quote
  #6  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 11:32 AM



Jukka K. Korpela wrote:
Quote:
Jack <mrdemeanour (AT) nospam (DOT) 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.




Reply With Quote
  #7  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 11:33 AM



fjleon (AT) gmail (DOT) com wrote:
Quote:
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:underline; 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.


Reply With Quote
  #8  
Old   
FJ
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 01:20 PM




Quote:
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.



Reply With Quote
  #9  
Old   
axlq
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-02-2006 , 01:37 PM



In article <1149272447.411015.161860 (AT) u72g2000cwu (DOT) googlegroups.com>,
FJ <fjleon (AT) gmail (DOT) com> wrote:
Quote:
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


Reply With Quote
  #10  
Old   
Michael Winter
 
Posts: n/a

Default Re: Maximum width with <SPAN> - 06-12-2006 , 10:35 AM



On 02/06/2006 17:18, Jukka K. Korpela wrote:

[snip]

Quote:
Of course, one can set max-width for a <span> element.
Though one shouldn't expect such a declaration to have any affect. The
min- and max-width properties apply to "all elements except non-replaced
inline elements and table elements".

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.