473,406 Members | 2,217 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,406 software developers and data experts.

Using Span in an ASP table

I asked the question yesterday:
HI All :-)

I don't know if I will be able to do this type of formatting, but what I
need to do is have a table row where the text wraps (This is easy) the first line of text is font size 10 pt and the second (wrapped text) is 6 pt. I
know how to create a style sheet to get all of my font one size or the
other, but does any one have any suggestions on how to do this?

Line 1: font size 10pt>Hi, My name is Coleen<font size 10 pt
Line 2: font size 6pt>I need this to be small like a footnote<font size 6pt
Both lines need to be in the SAME table row/cell...

TIA if any one can help, I really appreciate it :-)

Coleen
and got this response:
Use :first-line pseudo element in your style sheet. Unless of course it's
you who's wrapping the text, then just put the first line in a span or div
element and set the style on that... Jerry


Thanks Jerry, but I tried using Span or DIV inside the tableRow and it is not allowed. If there is away to do this can you please send me an example? Thanks very much :-)

Coleen
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #1
4 1921
psb
<table border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td width="140"><div style="font-size:10pt;">Hi, My name is Coleen</div>
<div style="font-size:6pt;">Hi, My name is Coleen Hi, My name is Coleen Hi,
My name is Coleen</div>
</td>
</tr>
</tbody>
</table>

the width 140 can go anywhere; <table>, <td>,
style="width:140px:font-size..."

now, if you are not allowed to specify a width, you would need to assign
everything an id and do some dhtml;ie, get the legth of the innerHTML and
calculate/approximate the size in pixels, the width, "hi, my name is coleen"
is at 10pt. once you have the width, you could set the style.width property
for the second div tag that has the 6pt text in it. this way you would
almost have to

-p

"coleenholley" <coleenholley@-NOSPAM-dmv.state.nv.us> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
I asked the question yesterday:
HI All :-)

I don't know if I will be able to do this type of formatting, but what I
need to do is have a table row where the text wraps (This is easy) the first
line of text is font size 10 pt and the second (wrapped text) is 6 pt. I
know how to create a style sheet to get all of my font one size or the
other, but does any one have any suggestions on how to do this?

Line 1: font size 10pt>Hi, My name is Coleen<font size 10 pt
Line 2: font size 6pt>I need this to be small like a footnote<font

size 6pt

Both lines need to be in the SAME table row/cell...

TIA if any one can help, I really appreciate it :-)

Coleen


and got this response:
Use :first-line pseudo element in your style sheet. Unless of course it's
you who's wrapping the text, then just put the first line in a span or divelement and set the style on that...

Jerry


Thanks Jerry, but I tried using Span or DIV inside the tableRow and it is

not allowed. If there is away to do this can you please send me an example?
Thanks very much :-)
Coleen
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest

Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #2
Thanks P, I'm not sure it this will work though; I am not using an HTML table - I'm using an ASP table. My code in part is

<asp:Table id="tbl_tax_subtotals" runat="server" CssClass="table" Width="100%"
<asp:TableRow
<asp:TableCell Width="10px" HorizontalAlign="Center">13</asp:TableCell
<asp:TableCell Width="170px" HorizontalAlign="left" Font-Size="8pt"
Indexed Tax (From Worksheet 3)</asp:TableCell
<asp:TableCell Width="25px" CssClass="table" HorizontalAlign="Center"></asp:TableCell
</asp:TableRow
</asp:Table

I can of course do a span or a DIV before the table, but not in the middle of a tablerow...can I do what you've suggested in an ASP table? I've tried but must not have the syntax correct, because I get an error that "Could not find any attribute 'div' of element 'TableCell'. I need the font size to be 10 pt for Indexed Tax and 6 pt for (From Worksheet 3) Any suggestions? Thanks! Coleen

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #3
psb
asp tables (web control tables) are just like html table (html controls)
which get spit out as html tables anyhow... even with old-fashioned html
you couldn't put anything between <table>NO<tr> or <tr>NO<td>. The only
text that can be entered would be in the cell or <td>YES</td>. inside here,
you can do anything....

I just put the <div> or <span> between the <asp:tablecell></asp:tablecell>
tags...below is perfectly legal...
<asp:TableCell Width="10px" HorizontalAlign="Center"><span
style="font-size:10pt;">13</span></asp:TableCell>
hope that helps...

<coleenholley> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Thanks P, I'm not sure it this will work though; I am not using an HTML table - I'm using an ASP table. My code in part is:
<asp:Table id="tbl_tax_subtotals" runat="server" CssClass="table" Width="100%"> <asp:TableRow>
<asp:TableCell Width="10px" HorizontalAlign="Center">13</asp:TableCell> <asp:TableCell Width="170px" HorizontalAlign="left" Font-Size="8pt">
Indexed Tax (From Worksheet 3)</asp:TableCell>
<asp:TableCell Width="25px" CssClass="table" HorizontalAlign="Center"></asp:TableCell> </asp:TableRow>
</asp:Table>

I can of course do a span or a DIV before the table, but not in the middle of a tablerow...can I do what you've suggested in an ASP table? I've tried
but must not have the syntax correct, because I get an error that "Could not
find any attribute 'div' of element 'TableCell'. I need the font size to be
10 pt for Indexed Tax and 6 pt for (From Worksheet 3) Any suggestions?
Thanks! Coleen
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest

Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #4
Yes, Thanks! The problem is that I'm learning ASP.Net, and don't know the exact syntax, so when I tried using Span inside the tablecell, I had the syntax wrong...

Thanks very much for your help - I appreciate it :-)

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #5

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

Similar topics

1
by: bin_P19 P | last post by:
the code i have got is as follows and now im stuck <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Shopping...
3
by: davidkarlsson74 | last post by:
Error: document.getElementById("folderMenu").cells has no properties File: http://www.volkswagen.se/tillbehor/js/foldermenu.js Rad: 49 The function activates different DIV:s, but doesn't seem to...
3
by: vanisathish | last post by:
Hi I am running a client side javascript timer to periodically refresh the contents of some tables in the HTML page. The table values are dynmically binded from XML DOM object using the <XML tag...
6
by: Ian Davies | last post by:
Hello all I have the following PHP script to place records from my MySql db into a table. However I now wish users to beable to select the multiple records from the table and on clicking a button...
2
by: ricky | last post by:
Hello, If anyone could help me with this I would highly appreciate it. I've tried everything and nothing works. What I am trying to do is so damn basic and it's just frustrating that it seems...
3
by: bloc | last post by:
I am programming an interactive CV using xml, xslt and java script. The page consists of a header which contains links to various 'sections' on the xml cv, a left and right menu, and a central...
5
by: jonathan184 | last post by:
Hi I am trying to access a log file and read the fikle into an array and split the file using the space as a delimiter but i get this error. Parse error: syntax error, unexpected $end in...
2
by: ph33red | last post by:
Hi, I'm having a problem getting my code to pull the appropriate information when I call for it via URL. (example: http://..../.php?id=2). For some reason I can't get it to pull the information for...
3
by: nathanwb | last post by:
I have the following php code, at the top I am pulling a piece of data from a query and I echo the results with no problem, I am using Ajax with this page as well and further down the page when I...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...
0
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,...
0
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...
0
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,...
0
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...

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.