Topic: text align css1 (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10954" title="Pages that link to Topic: text align css1 (Page 1 of 1)" rel="nofollow" >Topic: text align css1 <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 04-21-2003 23:56

Hi, guys.
How are ya? Did you have happy easter holidays?
Well, could you give me your words about this?
I am trying to align text in table data like this:

quote:
.c { text-align: center bottom;}
................
<td class="c">C:\</td>



But as you know it didn't work.
I guess put to things like above wrong or not supported, right?
I will find another way anyway.

And also, current browser doesn't support this CSS2, right?

quote:
td.top { border-top: hidden;
border-right: hidden;
border-left: hidden;
border-bottom: hidden;
}



What I am doing is making table. But I want to some table data with border, but some not. Do you have any idea to show and hide table data border?

Thanks in advance.


Hiroki Kozai

[This message has been edited by Hiroki (edited 04-22-2003).]

Xdreamer.ch
Maniac (V) Inmate

From: Switzerland
Insane since: Mar 2001

posted posted 04-22-2003 01:06

did it worked with

code:
td.c { text-align: center bottom;}
................
<td class="c">C:\</td>



in the css?

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 04-22-2003 01:09

No. It didn't work at all.
When I did just align-center, it was fine. But I wanted to do both of them live above.


Hiroki Kozai

brucew
Paranoid (IV) Inmate

From: North Coast of America
Insane since: Dec 2001

posted posted 04-22-2003 02:17

Text-align only works horizontally. To align the text vertically, use vertical-align, as in:

td.c { text-align: center bottom; vertical-align: bottom;}

See also: http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align

<edit>Sorry. Forgot about your second question. Try:

td.top {border: 0 none; }

See also: http://www.w3.org/TR/CSS2/box.html#propdef-border

Hidden is used to remove things from the document flow, and so, applies only to elements, not to attributes of those elements.

HTH!



[This message has been edited by brucew (edited 04-22-2003).]

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 04-22-2003 02:22

Cheers, mate.

Hiroki Kozai

brucew
Paranoid (IV) Inmate

From: North Coast of America
Insane since: Dec 2001

posted posted 04-22-2003 02:44

BTW, the best quick reference I've found for CSS is over at Netscape DevEdge. In the Toolbox install the Quick Reference Sidebar Tabs. Naturally you'll need to do it in a Mozilla-based browser. Install them once and they're there in all your Moz/Netscape installations automagically.

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 04-22-2003 03:05

brucew: why the 2 parameters?
"td.top {border: 0 none; }"

wouldn't
td.top {border: none;}
do the job?

so would
td.top {border-width: 0px;}

If you are setting all 4 borders to the same value, whatever it is, you don't need to specify top, right, bottom and left.

The same is true with padding and margins

And if top=bottom, and left=right you can get away with 2 parameters:

margin {5px 10px;}
would set top and bottom margins to 5px and left and right to 10px.

brucew
Paranoid (IV) Inmate

From: North Coast of America
Insane since: Dec 2001

posted posted 04-22-2003 05:57
quote:
why the 2 parameters

Bad memory or something.

Somehow I got it into my head that it worked like in the old days with frame borders, IE4 and NS4 required one but wouldn't work with the other so you had to use both.

Having just tested on a simple DIV with my full suite of (Windows) browsers--IE 4, 5, 5.5, 6, Netscape 4, 6, 7, Opera 4, 5, 6, 7 and Mozilla 1.3--only Netscape 4 messes up (imagine that!) and only when using "none" alone. Using the zero alone works just fine in them all. I haven't yet verified using tables. Too late, need sleep.

Thanks for making me check my facts. From now on I can save five bytes here and there.

brucew
Paranoid (IV) Inmate

From: North Coast of America
Insane since: Dec 2001

posted posted 04-22-2003 06:08

Ugh. Just re-read that. That last sentence could come off as sounding sarcastic. It's not meant that way.

I have one client where 65%-70% of their visitors are on dial-up. So I count bytes very carefully on their site--to the point where I use NoteTab because it will save with UNIX-style single byte line breaks instead of the MS-DOS/Windows two-byte carriage return/line-feed pairs. This, in addition to all the usual ways of reducing byte count.

Obsessive? Yes. Sarcastic? No.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu