stylesheet problem

J

Jochen Fuhrmann

i put this line in my stylesheet-file:

td.grey {color:rgb(128,128,128)}

if i put a line like in my code like


<td class="grey">
<table>
<tr><td>test text</td></tr>
</table>
</td>


test text ist black and not grey, how can i avoid that, and why is it like it
is?
 
D

David Dorward

Jochen said:
i put this line in my stylesheet-file:
td.grey {color:rgb(128,128,128)}
if i put a line like in my code like
<td class="grey"><table><tr><td>test text</td></tr></table></td>
test text ist black and not grey, how can i avoid that, and why is it like
it is?

Without seeing the rest of the code in context, its hard to say.

Why are you using nested tables anyway?

Are you trying to use tables for layout?
Yes -> http://www.allmyfaqs.com/faq.pl?Tableless_layouts
No -> Sure?
No -> http://www.allmyfaqs.com/faq.pl?Tableless_layouts
Yes -> Really? You are only using them to asociate rows and cols of
data?
No -> http://www.allmyfaqs.com/faq.pl?Tableless_layouts
Yes -> Give us a URL [with real data; the code you posted
contains only dummy text].
Data that is so complex that it makes sense to nest tables is
really rare. This is something special.
 
A

Adrienne

i put this line in my stylesheet-file:

td.grey {color:rgb(128,128,128)}

if i put a line like in my code like


<td class="grey">
<table>
<tr><td>test text</td></tr> </table> </td>


test text ist black and not grey, how can i avoid that, and why is it
like it is?

What browser? Opera and Netscape 7 display just fine. IE and NS 4 are not
inheriting the class grey. If you put class="grey" into that second td
element, it will work.

Now, you're not trying to use tables for presentation, are you?
 
D

David Dorward

why? i always thought people hate frames, but tables?

The new[1] way is to use HTML that describes the meaning of the text and its
relationship with other things. Tables say something about the data (i.e.
everything in this column has something in common, and everything in this
row has something in common) and should not be used because of the way that
some browsers happen to present that relationship to the visitor.

This isn't to say that you shouldn't use tables, but that you should only
use tables for tabular data.

[1] OK OK, not new. Its how HTML was originally conceived, and its been
promoted heavily for the past 2 years or so.
 
L

Leif K-Brooks

Jochen Fuhrmann said:
why? i always thought people hate frames, but tables?

We don't hate tables. We hate using tables for something other than tabular data.
 
E

Els

Leif said:
We don't hate tables. We hate using tables for something other than tabular data.

But sometimes it's pretty difficult not to use them.
I have an example, and I would be happy if anyone could show
me a way to have the exact same visual effect, without using
the table.
http://www.mediatech.nl/~rachel/Frameless/Rachel/livearchenemyfieldsofrock.html
and
http://www.mediatech.nl/~rachel/Frameless/Rachel/live.html
Stylesheet is at
http://www.mediatech.nl/~rachel/Frameless/Rachel/all.css

Don't try to click the links, most don't work, as it's still
under construction. Also the color of the text, I know, it's
not what it should be, but I want to know how to replicate
the visual effect of the line up of the thumbs, without
using a table.

About accessibility, I don't think these pages will be less
understandable for a speech browser, than they would be
leaving out the table.
 
B

brucie

Nice one, I see you changed it. This one looks much better
than the old one, if I may say so ;-)

thanks. the idea was layouts not achievable with tables or i/frames.
But:
All this $ stuff is way over my head :-(
What language is it anyway?

php but you can do it with static html/css. you just change the css to
position the images where your want them. very easy with your
livearchenemyfieldsofrock.html page. live.html is a bit more complex
with the text below the images but you just have the image and text
within the same container and then position the container where you
want it. you could also use display:table and display:table-cell in
your css to mimic a table layout. it would be by far the easiest way
but not supported by IE because its shit.
 
D

David Dorward

All this $ stuff is way over my head :-(
What language is it anyway?

It's PHP, but you don't need to know it. View source in the browser to see
the code that actually creates the visual effect. The PHP is just a way to
select different layouts.
 
J

Jochen Fuhrmann

brucie said:

thats cool, but i want to place lots of "frames" (not html frames) on
my page, they are all situated at different parts of the page, the corners are
constucted by images,
and the "frames" have different sizes and and there are many of them, i dont
wanna create an
absolute position of an ellement everytime i wanna place one on my
page, cause if i wanna change something, like increase text or someting,
i would have to replace all the "frames" below this change, how could i manage
this?

jochen

looks like that:

<table>
<tr height="15">
<td width="15" background="bubbles/left_top.bmp"></td>
<td class="bubble">home</td>
<td width="15" background="bubbles/right_top.bmp"></td>
</tr>
<tr>
<td width="15" class="bubble"></td>
<td width="400" height="" class="bubble_empty"><img
src="home/nationalgeographic.jpg"></td>
<td width="15" class="bubble"></td>
</tr>
<tr height="15">
<td width="15" background="bubbles/left_bottom.bmp"></td>
<td class="bubble"></td>
<td width="15" background="bubbles/right_bottom.bmp"></td>
</tr>
</table>
</td>
<td width="10"></td>
<td valign="top">

if you cannot imagine what the problem is i probably could upload some of the
stuff somewhere
 
E

Els

brucie said:
In post <[email protected]>
Els said...




thanks. the idea was layouts not achievable with tables or i/frames.




php but you can do it with static html/css.

Yeah, I saw that after I pressed 'send' ;-)
you just change the css to
position the images where your want them. very easy with your
livearchenemyfieldsofrock.html page.

Absolute positioning. I use that on pages like
http://www.mediatech.nl/~rachel/Frameless/Rachel/index.html
but it's a lot more work than using the table, and I have to
do it on about 125 pages, and this amount is growing every
week.
Oh, and on some 600 more, but that's only a one cell table,
to center a bigger picture. All different sizes though, so I
can't use the same position for every picture.
live.html is a bit more complex
with the text below the images but you just have the image and text
within the same container and then position the container where you
want it.

Only it gets screwed up a bit, 'cause the text under the
thumbs is not always just one line... so I'd have to put the
text in a seperate container, which will have the same
accessibility effect as the table has now.
you could also use display:table and display:table-cell in
your css to mimic a table layout. it would be by far the easiest way
but not supported by IE because its shit.

Yep, but as long as 'most people' use it, and I want them to
have nice pages to look at, ...
I'm already compromising with the background-attachment.

I'll think about switching to absolute positioning instead
of tables, but I don't know. If all pages had identical
layout, it wouldn't be so bad, but they're almost all
different. Also, if I would later change the width of the
site to flexible instead of fixed, a table (if I use a
percentage for width) would distribute the thumbs evenly,
while absolute positioning would keep everything in the same
place.
Thanks for reminding me of the option, though, it gives me
something to think about.

I know tables are _supposed_ to be used only for tabular
data, but don't you agree, that in this case, using a table
would be far less work and has no difference in
accessibility compared to the positioning-through-css method?
 
R

rf

Els said:
brucie wrote:

Absolute positioning. I use that on pages like
http://www.mediatech.nl/~rachel/Frameless/Rachel/index.html
but it's a lot more work than using the table, and I have to
do it on about 125 pages, and this amount is growing every
week.

Er, I have a picture album here: http://www.cueword.com.au/mulubinba - the
whole thing is generated by a program that reads the the folder containing
the images and text for the real (paper) album, compresses them, makes
thubmails and those floating spans (or is it divs now) and bunches the whole
thing together.

It's not yet totally accessible and cross browser (am working on it) but it
may help you. Don't comment on the quality of the images, they are the best
I have :)

Cheers
Richard.
 
E

Els

David said:
It's PHP, but you don't need to know it. View source in the browser to see
the code that actually creates the visual effect. The PHP is just a way to
select different layouts.

Yes, I saw that
.... after I pressed the send button ;-)
 
E

Els

rf said:
Er, I have a picture album here: http://www.cueword.com.au/mulubinba - the
whole thing is generated by a program that reads the the folder containing
the images and text for the real (paper) album, compresses them, makes
thubmails and those floating spans (or is it divs now) and bunches the whole
thing together.

A program. No handcoding?
It's not yet totally accessible and cross browser (am working on it) but it
may help you. Don't comment on the quality of the images, they are the best
I have :)

I won't comment on the quality of the images ;-) (I read
your explanation for it in another thread or news group)
But may I comment on the layout?
Did you compare it to the pages I asked advice for?
If you would loose the subscriptions to the thumbs, it
wouldn't be all that bad, but only if you want them just
lined up. Now on a lot of my pages, I don't want the thumbs
just lined up. I want them lined up in a particular way.
Have a look at the old site (beware: flash screen, frames,
horizontal scrollbar, no doctype, no validation) to see more
pages, so you'll see what I mean.
url: http://www.rachelrijsdijk.com/
 
B

brucie

Absolute positioning. I use that on pages like
http://www.mediatech.nl/~rachel/Frameless/Rachel/index.html
but it's a lot more work than using the table, and I have to
do it on about 125 pages, and this amount is growing every
week.

your nuts doing 125 static pages. i wouldn't even use a preprocessor
for that many (although i did have a 27,000 static html page site once
because the server sucked). learn php and mysql.
Oh, and on some 600 more,
insane
Only it gets screwed up a bit, 'cause the text under the
thumbs is not always just one line... so I'd have to put the
text in a seperate container,

no you wouldn't. the text will wrap in the container unless you do
something to stop it.

<container>
<img...><br>
text text text
Yep, but as long as 'most people' use it, and I want them to
have nice pages to look at, ...

the longer site authors support crap browsers the longer people will
use them. there isn't going to be a new IE for about 2 years and it
wont be free. IE6 is already over 2 years old. theres no way in hell
i'm still going to support IE6 in 2005. i'm already using alternate
dumbed down designs for IE6.
I'll think about switching to absolute positioning instead
of tables, but I don't know.

you don't need to use absolute positioning, its just one of many
options css gives you.
If all pages had identical layout, it wouldn't be so bad, but they're
almost all different.

very simple using different css templates.
I know tables are _supposed_ to be used only for tabular data, but don't
you agree, that in this case, using a table would be far less work and has
no difference in accessibility compared to the positioning-through-css
method?

absolutely not. your lack of skill and knowledge is dictating your
design methods.
 
S

Sean Jorden

the longer site authors support crap browsers the longer people will
use them.

*ahem* corporate/institutional desktops - they are very conservative when
it comes to adopting new technology, and their users often don't have a
choice of what software they can run. Not to mention dial-up users that
find it difficult to install a new browser because of how long it takes to
download.

My experience with broadband users possessing a free will is that they are
happy to upgrade, however. Most don't even know what browser version they
are running.
there isn't going to be a new IE for about 2 years and it
wont be free. IE6 is already over 2 years old. theres no way in hell
i'm still going to support IE6 in 2005. i'm already using alternate
dumbed down designs for IE6.

If your site looks weird in IE6 two years from now, will they blame it on
you or their browser?

Considering the next Microsoft OS won't likely be out until 2005, I wager
IE6 will be a mainstream browser for 5 more years *at least*. Kind of
depressing, if you ask me.
 
B

brucie

thats cool, but i want to place lots of "frames" (not html frames) on my
page, they are all situated at different parts of the page, the corners are
constucted by images, and the "frames" have different sizes and and there
are many of them, i dont wanna create an absolute position of an ellement
everytime i wanna place one on my page, cause if i wanna change something,
like increase text or someting, i would have to replace all the "frames"
below this change, how could i manage this?

use floats, margins and padding to position the containers where you
want them. the design should then automatically adjust when making
text bigger/smaller changing window size etc.
<td width="15" background="bubbles/left_top.bmp"></td>

if you cannot imagine what the problem is i probably could upload some of the
stuff somewhere

good idea
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top