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

[Q] table cell spanning whole page?

I would like to create a table with a bar of text that spans the whole
page.

Here is what I have so far:

<table border=0 width="100%" >
<tr>
<td><img src="SANimages/magnify.gif"></td>
<td valign="top"><span
style="font-size:12px;font-weight:bold;color:#f1f1f1;
background:#484848;width:100%;text-align:left;">Search</span></td>
</tr>
</table>

Problem is, the bar of text seems to be right-aligned, and even with
the style being width:100%, it still doesn't span the entire table
cell it's in.

What am I doing wrong?
Jul 20 '05 #1
3 4884
Sir Loin of Beef wrote:
I would like to create a table with a bar of text that spans the whole
page.

Here is what I have so far:

<table border=0 width="100%">
<tr>
<td><img src="SANimages/magnify.gif"></td>
<td valign="top"><span
style="font-size:12px;font-weight:bold;color:#f1f1f1;
background:#484848;width:100%;text-align:left;">Search</span></td>
</tr>
</table>

Problem is, the bar of text seems to be right-aligned, and even with
the style being width:100%, it still doesn't span the entire table
cell it's in.

What am I doing wrong?


(1) It looks like you are trying to use tables for layout
(2) You don't have alt text on your image
(3) You are specifying the font size in pixels (are you trying to make it
impossible for people on high resolution systems, or with poor eyesight, to
read the content?)
(4) You are attempting to apply width to an inline element (span[1]), to
which it doesn't apply.

I think the problem you are perceiving is caused mainly by having two
columns without a width set on either. The real problem is your entire
approach.

[1] Which, as the only element inside the cell, is redundent anyway.

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
Jul 20 '05 #2
So what should I do?

I'd like to have a single horizontal bar with 2 parts -
the left a small image, and the right, a bar of text spanning the
remainder of the column width. The image size may change later, so I
don't want to hardcode the image dimensions into the <img width> tag.

This entire horizontal bar will be placed in a div that occupies part,
not all of the page.
impossible for people on high resolution systems, or with poor eyesight, to
read the content?)
(4) You are attempting to apply width to an inline element (span[1]), to
which it doesn't apply.

I think the problem you are perceiving is caused mainly by having two
columns without a width set on either. The real problem is your entire
approach.

[1] Which, as the only element inside the cell, is redundent anyway.

Jul 20 '05 #3
Sir Loin of Beef wrote:
So what should I do?
Stop top posting.
I'd like to have a single horizontal bar with 2 parts -
the left a small image, and the right, a bar of text spanning the
remainder of the column width.


Float the image left.
--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
Jul 20 '05 #4

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

Similar topics

1
by: Kai Grossjohann | last post by:
I have a table which contains a top-aligned table cell: .... <tr style="height:40"> ... <td colspan="1" rowspan="2" align="left" valign="top" style="overflow:hidden;">...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
2
by: steventhrasher42 | last post by:
I can't figure out a way to possibly make this work in HTML. I have a table embedded in another table, with the inner table spanning a few columns. I would like for the outer table to span the...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
8
by: Gianni Rondinini | last post by:
hi all, i'm here again. i couldn't find/understand this on w3c css2 recommendation and documentation, then here i ask. i decided to still use some tables in my pages for some forms. i played...
7
by: SteveM | last post by:
I am sure this is an easy question, but being relatively new to ASP.NET programming, I can not quite grasp what I need to accomplish what I need to do. What I have is a word document that is...
1
by: Bart Lateur | last post by:
I'm trying to put a utton at the bottom (right) of a TD cell, irrespective of what else is in there. Usually, with other HTML block elements, we're told to use position: relative on the...
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
17
by: Liam Gibbs | last post by:
Hello everyone, I'm having a problem with a site I'm building. It uses tables, but it's really tricky. A picture of the layout I need can be found at http://www.altmarvel.net/Liam/WHATINEED.jpg...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.