Go Back   Forum Care Forums > Development Reference Area > Webmaster Topics

Reply
 
LinkBack Thread Tools Display Modes
Re: CSS centred alignment
Old
  (#11)
John Hosking
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

Mark Goodge wrote:
> I'm trying to create a list that's centred on a single character in the
> middle of the line - something like a fixture list, like this:
>
> Arsenal v Chelsea
> Liverpool v Manchester Utd


>
> This effect is easy to achieve with tables, like this...
>
> <tr>
> <td align=right>team 1</td>
> <td align=center>v</td>
> <td align=left>team 2</td>
> </tr>


Tables, as discussed. But you don't need three cells per row, only two.

--
John
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: CSS centred alignment
Old
  (#12)
Krustov
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

<uk.net.web.authoring>
<John Hosking>
<Fri, 25 May 2007 17:37:25 +0200>
<EMAIL REMOVED>

> > This effect is easy to achieve with tables, like this...
> >
> > <tr>
> > <td align=right>team 1</td>
> > <td align=center>v</td>
> > <td align=left>team 2</td>
> > </tr>

>
> Tables, as discussed. But you don't need three cells per row, only two.
>


Wrong - fartfox needs things put in the <td> if its to work correctly .
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: CSS centred alignment
Old
  (#13)
GreyWyvern
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

And lo, John Hosking didst speak in alt.www.webmaster,uk.net.web.authoring:

> Mark Goodge wrote:
>> I'm trying to create a list that's centred on a single character in the
>> middle of the line - something like a fixture list, like this:
>> Arsenal v Chelsea
>> Liverpool v Manchester Utd

>
>> This effect is easy to achieve with tables, like this...
>> <tr>
>> <td align=right>team 1</td>
>> <td align=center>v</td>
>> <td align=left>team 2</td>
>> </tr>

>
> Tables, as discussed. But you don't need three cells per row, only two..


How so? By placing the "v" with one of the two team names? That would
distort the tabular data, and defeat the purpose of using the table in the
first place. "Arsenal v" and "Chelsea"? "Liverpool" and "v Manchester
Utd"?

If, rather, you mean to have the middle <td> element only in the first row
and have it "rowspan" through all the rows, that would make a little more
sense, but it would still not convert to a sensible textual representation.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- http://www.greywyvern.com/orca#search - Orca Search: Full-featured
spider and site-search engine
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: CSS centred alignment
Old
  (#14)
John Hosking
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

Krustov wrote:
> <uk.net.web.authoring>
> <John Hosking>
> <Fri, 25 May 2007 17:37:25 +0200>
> <EMAIL REMOVED>
>
>>> This effect is easy to achieve with tables, like this...
>>>
>>> <tr>
>>> <td align=right>team 1</td>
>>> <td align=center>v</td>
>>> <td align=left>team 2</td>
>>> </tr>

>> Tables, as discussed. But you don't need three cells per row, only two.
>>

>
> Wrong - fartfox needs things put in the <td> if its to work correctly .


What?

<tr>
<td align=right>team 1 v</td>
<td align=left>team 2</td>
</tr>

--
John
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: CSS centred alignment
Old
  (#15)
Stevie D
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

Jaya wrote:

> you can use simple tables to get these results...
>
> <tr>
> <td align=right width=50>Arsenal</td>
> <td align=center width=5>Vs</td>
> <td align=left width=50>Chelsea</td>
> </tr>

etc...

That is *not* a simple table!

Specifying the width of each cell is completely unnecessary, and
totally unhelpful. Just leave the browser to sort out the size it
needs, and it will fit the table nicely round whatever text is in
there.

--
Stevie D
\\\\\ ///// Bringing dating agencies to the
\\\\\\\__X__/////// common hedgehog since 2001 - "HedgeHugs"
___\\\\\\\'/ \'///////_____________________________________________
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: CSS centred alignment
Old
  (#16)
Doc O'Leary
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

In article <EMAIL REMOVED>,
John Hosking <EMAIL REMOVED> wrote:

> Yes, that's rather what I meant. It's *not* clean semantically, but I
> don't think I agree that it "defeats the purpose of using the table in
> the first place", since the matches are still in the same row. But feel
> free to persuade me.


It's not really that big of a deal for alignment, I suppose, but you
have to ask yourself about what might be done with the page dynamically
and/or how it might be most simply generated. Additionally, the use of
CSS to style the individual td elements would not be possible if you
cram the stuff together.

--
My personal UDP list: 127.0.0.1, 4ax.com, buzzardnews.com, googlegroups.com,
heapnode.com, localhost, x-privat.org
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: CSS centred alignment
Old
  (#17)
Simon Brooke
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

in message <EMAIL REMOVED>, John Hosking
('EMAIL REMOVED') wrote:

> Mark Goodge wrote:
>> I'm trying to create a list that's centred on a single character in the
>> middle of the line - something like a fixture list, like this:
>>
>> Arsenal v Chelsea
>> Liverpool v Manchester Utd

>
>>
>> This effect is easy to achieve with tables, like this...
>>
>> <tr>
>> <td align=right>team 1</td>
>> <td align=center>v</td>
>> <td align=left>team 2</td>
>> </tr>

>
> Tables, as discussed. But you don't need three cells per row, only two.


The data seems to me to imply three cells per row, doesn't it? Is the 'v'
part of 'Arsenal' or of 'Chelsea'? I agree that presentationally it buys
you nothing, but is still seems to me the correct solution.

Oh - and cl*** your columns, don't put presentational details into the
markup.

--
EMAIL REMOVED (Simon Brooke) http://www.jasmine.org.uk/~simon/

Do not sail on uphill water.
- Bill Lee
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: CSS centred alignment
Old
  (#18)
Toby A Inkster
Guest
 
Posts: n/a
Default Re: CSS centred alignment - 06-02-2007, 08:53 PM

Simon Brooke wrote:

> Personally, I think that one would be very tricky with CSS; not impossible
> but not at all easy. Like others, I'd use a table.


It's fairly easy if you use inline-block, but not all browsers support
inline-block.

<div cl***="match">
<span cl***="team first-team">Arsenal</span>
<span cl***="versus">v</span>
<span cl***="team second-team">Man Utd</span>
</div>

..team { display: inline-block; width: 45%; }
..first-team { text-align: right; }

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 96 days, 20:19.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

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





Contact Us - Forum Care Forums - Archive - Top