Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Styling a table

Reply
Thread Tools

Styling a table

 
 
={ Advocated }=
Guest
Posts: n/a
 
      09-15-2003
Hey there, i have say 20 cells in a table, say 15 of them are all one
background colour, and the other 5 arent.. I want to use css for this, so
how would i go about it?

Cheers


 
Reply With Quote
 
 
 
 
andy johnson
Guest
Posts: n/a
 
      09-15-2003
On Mon, 15 Sep 2003 02:12:09 +0100, "={ Advocated }="
<(E-Mail Removed)> wrote:

>Hey there, i have say 20 cells in a table, say 15 of them are all one
>background colour, and the other 5 arent.. I want to use css for this, so
>how would i go about it?
>
>Cheers
>

Try in stylesheet:
td {background-color:#EEEEFF; border: thin solid black; }
..teedee {background-color:#EECCFF; border: thin solid black; }


<td>&nbsp;</td>
<td class="teedee">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="teedee">&nbsp;</td>

http://www.echoecho.com/csscolors.htm has something on this, among
others.

-
Andy

"There would be a lot more civility in this world if people
didn't take that as an invitation to walk all over you"
- (Calvin and Hobbes)
 
Reply With Quote
 
 
 
 
Nico Schuyt
Guest
Posts: n/a
 
      09-15-2003
={ Advocated }= wrote:
> Hey there, i have say 20 cells in a table, say 15 of them are all one
> background colour, and the other 5 arent.. I want to use css for
> this, so how would i go about it?


Look at the example Els made for you:
http://home.tiscali.nl/~elizabeth/ad.../newindex.html
(and my suggestion at http://www.nicoschuyt.nl/test/advocated.htm
Regards, Nico


 
Reply With Quote
 
={ Advocated }=
Guest
Posts: n/a
 
      09-15-2003

"Nico Schuyt" <(E-Mail Removed)> wrote in message
news:3f657e84$0$28894$(E-Mail Removed)...
> ={ Advocated }= wrote:
> > Hey there, i have say 20 cells in a table, say 15 of them are all one
> > background colour, and the other 5 arent.. I want to use css for
> > this, so how would i go about it?

>
> Look at the example Els made for you:
> http://home.tiscali.nl/~elizabeth/ad.../newindex.html
> (and my suggestion at http://www.nicoschuyt.nl/test/advocated.htm
> Regards, Nico
>
>



This is what ive done now so far:
http://homepage.ntlworld.com/c.jones...t/NewIndex.htm

It doesnt look very pretty at the moment, the sides also seem to have monged
since ive uploaded..

Anyway, i havent put all sizes etc into css yet, i will once i have an idea
of what it will look like.

The cells with the certain px in are the ones that need to be that size, but
im not sure what to put in all the others?

Any ideas? See the one at the bottom, the copyright thing, would it be best
to set that to 100% ? or would that not work, because then im thinking it
would stretch to the bottom of the browser.. Any help would be apreciated


 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      09-15-2003
={ Advocated }= wrote:

> "Nico Schuyt" <(E-Mail Removed)> wrote in message
> news:3f657e84$0$28894$(E-Mail Removed)...
>
>>={ Advocated }= wrote:
>>
>>>Hey there, i have say 20 cells in a table, say 15 of them are all one
>>>background colour, and the other 5 arent.. I want to use css for
>>>this, so how would i go about it?

>>
>>Look at the example Els made for you:
>>http://home.tiscali.nl/~elizabeth/ad.../newindex.html
>>(and my suggestion at http://www.nicoschuyt.nl/test/advocated.htm
>>Regards, Nico

>
> This is what ive done now so far:
> http://homepage.ntlworld.com/c.jones...t/NewIndex.htm
>
> It doesnt look very pretty at the moment, the sides also seem to have monged
> since ive uploaded..
>
> Anyway, i havent put all sizes etc into css yet, i will once i have an idea
> of what it will look like.


I still think it's better to do that now, because right now
the page doesn't validate. And what doesn't validate, might
have a 'different' effect in different browsers, which will
have you redoing loads of stuff again, after you got it the
way you wanted it.

> The cells with the certain px in are the ones that need to be that size, but
> im not sure what to put in all the others?


Let them size with the content?

> Any ideas? See the one at the bottom, the copyright thing, would it be best
> to set that to 100% ? or would that not work, because then im thinking it
> would stretch to the bottom of the browser.. Any help would be apreciated


100% of what? No, give it a height, or better, let it be the
height the text in the footer needs (my opinion), and let
the rest of the page free. If you want the footer at the
bottom of the window, a seperate div for the footer might do
what you want, which I think is easier to accomplish with
Nico's structure than with the table. But keep in mind, that
if there isn't much content, people don't like to scroll all
the way down just to see a copyright note. Personally, I'd
put the footer on the bottom of the page, not at the bottom
of the window.

--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

 
Reply With Quote
 
Nico Schuyt
Guest
Posts: n/a
 
      09-15-2003
={ Advocated }= wrote:
> "Nico Schuyt" wrote
>> ={ Advocated }= wrote:
>>> Hey there, i have say 20 cells in a table, say 15 of them are all
>>> one background colour, and the other 5 arent.. I want to use css for
>>> this, so how would i go about it?

>>
>> Look at the example Els made for you:
>> http://home.tiscali.nl/~elizabeth/ad.../newindex.html
>> (and my suggestion at http://www.nicoschuyt.nl/test/advocated.htm


> This is what ive done now so far:
> http://homepage.ntlworld.com/c.jones...t/NewIndex.htm


Ehh, forgive me my ignorance, but why didn't you just started with the
advice of Els? At least that validates.
And don't try so hard to make everything fixed in px. I (almost) never
specify a height but let it depend on the content.
Also it's in fact useless: If a visitor decides to increase the font (IE
View->Text size-> Large) your cell of 19px will be 60px or something like
that.
Nico


 
Reply With Quote
 
={ Advocated }=
Guest
Posts: n/a
 
      09-15-2003

"Nico Schuyt" <(E-Mail Removed)> wrote in message
news:3f65ef16$0$28897$(E-Mail Removed)...
> ={ Advocated }= wrote:
> > "Nico Schuyt" wrote
> >> ={ Advocated }= wrote:
> >>> Hey there, i have say 20 cells in a table, say 15 of them are all
> >>> one background colour, and the other 5 arent.. I want to use css for
> >>> this, so how would i go about it?
> >>
> >> Look at the example Els made for you:
> >> http://home.tiscali.nl/~elizabeth/ad.../newindex.html
> >> (and my suggestion at http://www.nicoschuyt.nl/test/advocated.htm

>
> > This is what ive done now so far:
> > http://homepage.ntlworld.com/c.jones...t/NewIndex.htm

>
> Ehh, forgive me my ignorance, but why didn't you just started with the
> advice of Els? At least that validates.
> And don't try so hard to make everything fixed in px. I (almost) never
> specify a height but let it depend on the content.
> Also it's in fact useless: If a visitor decides to increase the font (IE
> View->Text size-> Large) your cell of 19px will be 60px or something like
> that.
> Nico
>
>


Some of my cells dont have any text, just images etc for the styling.. And
mine is virtually the same as ells, except i use external css files instead
of in the html doc, and i wanted to do it myself


 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      09-15-2003
={ Advocated }= wrote:

> "Nico Schuyt" <(E-Mail Removed)> wrote in message
> news:3f65ef16$0$28897$(E-Mail Removed)...
>
>>={ Advocated }= wrote:
>>
>>>"Nico Schuyt" wrote
>>>
>>>>={ Advocated }= wrote:
>>>>
>>>>>Hey there, i have say 20 cells in a table, say 15 of them are all
>>>>>one background colour, and the other 5 arent.. I want to use css for
>>>>>this, so how would i go about it?
>>>>
>>>>Look at the example Els made for you:
>>>>http://home.tiscali.nl/~elizabeth/ad.../newindex.html
>>>>(and my suggestion at http://www.nicoschuyt.nl/test/advocated.htm

>>
>>>This is what ive done now so far:
>>>http://homepage.ntlworld.com/c.jones...t/NewIndex.htm

>>
>>Ehh, forgive me my ignorance, but why didn't you just started with the
>>advice of Els? At least that validates.
>>And don't try so hard to make everything fixed in px. I (almost) never
>>specify a height but let it depend on the content.
>>Also it's in fact useless: If a visitor decides to increase the font (IE
>>View->Text size-> Large) your cell of 19px will be 60px or something like
>>that.

>
> Some of my cells dont have any text, just images etc for the styling..

Which means you don't have to put any height in it, the
image will take care of the height of that particular cell

> And mine is virtually the same as ells, except i use external css files instead
> of in the html doc,


I would too, I just put them in the <head>, to change it
easily. After everything works, I move the whole lot to an
external stylesheet.

> and i wanted to do it myself


Fair enough, if you just copy what others do, you won't
understand what you did. (I did use some javascript that
way, and I still don't know what it does and why )
But do what I did: take out from the html everything that
can be done with css, and have the lot validated before you
move to the next step.


--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

 
Reply With Quote
 
Isofarro
Guest
Posts: n/a
 
      09-15-2003
={ Advocated }= wrote:

> Hey there, i have say 20 cells in a table, say 15 of them are all one
> background colour, and the other 5 arent..


Is there a reason why 5 cells should have a different background colour than
the others. Are they more important or less important than the other 15
cells?


--
Iso.
FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
Recommended Hosting: http://www.affordablehost.com/
Web Design Tutorial: http://www.sitepoint.com/article/1010
 
Reply With Quote
 
={ Advocated }=
Guest
Posts: n/a
 
      09-15-2003

"Isofarro" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ={ Advocated }= wrote:
>
> > Hey there, i have say 20 cells in a table, say 15 of them are all one
> > background colour, and the other 5 arent..

>
> Is there a reason why 5 cells should have a different background colour

than
> the others. Are they more important or less important than the other 15
> cells?
>
>
> --
> Iso.
> FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
> Recommended Hosting: http://www.affordablehost.com/
> Web Design Tutorial: http://www.sitepoint.com/article/1010


Well they are different colours because thats the way i want them, else it
would be a plain site with one colour


 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Styling <div> elements using display: inline-table Evertjan. Javascript 6 04-09-2009 07:05 PM
Custom row styling in a datagrid depending on certain data in ASP. =?Utf-8?B?Y2RiaWdncw==?= ASP .Net 0 03-12-2006 06:23 AM
Styling a control Roshawn ASP .Net 1 08-20-2004 11:43 PM
Styling radio buttons e n | c k m a HTML 4 12-03-2003 12:45 AM
styling buttons without CLASS W. Paulisse HTML 4 10-01-2003 01:05 AM



Advertisments