Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 04:10 PM
Sir Loin of Beef
Guest
 
Posts: n/a
Default [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?
  #2  
Old July 20th, 2005, 04:10 PM
David Dorward
Guest
 
Posts: n/a
Default Re: [Q] table cell spanning whole page?

Sir Loin of Beef wrote:
[color=blue]
> 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?[/color]

(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
  #3  
Old July 20th, 2005, 04:10 PM
Sir Loin of Beef
Guest
 
Posts: n/a
Default Re: [Q] table cell spanning whole page?

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.
[color=blue]
>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.
>[/color]
  #4  
Old July 20th, 2005, 04:10 PM
David Dorward
Guest
 
Posts: n/a
Default Re: [Q] table cell spanning whole page?

Sir Loin of Beef wrote:
[color=blue]
> So what should I do?[/color]

Stop top posting.
[color=blue]
> 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.[/color]

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
 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles