Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS equivalents for attributes

Reply
Thread Tools

CSS equivalents for attributes

 
 
Jeff Thies
Guest
Posts: n/a
 
      07-13-2004
There's a number of elements that I set attributes for:

<table border="1" cellpadding="3" cellspacing="0">..

<img align="middle">

Are there CSS equivalents for any of these?

Jeff
 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
 
Reply With Quote
 
 
 
 
SpaceGirl
Guest
Posts: n/a
 
      07-13-2004
Jeff Thies wrote:

> There's a number of elements that I set attributes for:
>
> <table border="1" cellpadding="3" cellspacing="0">..
>
> <img align="middle">
>
> Are there CSS equivalents for any of these?
>
> Jeff


<table style="border:1px #FFFFFF; padding:3px; margin:0px;">

<div syle="text-align:center"><img src="" alt="" /></div>


--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      07-13-2004
SpaceGirl wrote:

> Jeff Thies wrote:
>
>> There's a number of elements that I set attributes for:
>>
>> <table border="1" cellpadding="3" cellspacing="0">..
>>
>> <img align="middle">
>>
>> Are there CSS equivalents for any of these?
>>
>> Jeff

>
>
> <table style="border:1px #FFFFFF; padding:3px; margin:0px;">
>
> <div syle="text-align:center"><img src="" alt="" /></div>
>
>


oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
Chris Morris
Guest
Posts: n/a
 
      07-13-2004
Jeff Thies <(E-Mail Removed)> writes:
> There's a number of elements that I set attributes for:
>
> <table border="1" cellpadding="3" cellspacing="0">..
>
> <img align="middle">
>
> Are there CSS equivalents for any of these?


Yes. border, padding, border-spacing and vertical-align.
http://www.w3.org/TR/CSS2/

--
Chris
 
Reply With Quote
 
Chris Morris
Guest
Posts: n/a
 
      07-13-2004
SpaceGirl <(E-Mail Removed)> writes:
> Jeff Thies wrote:
> > There's a number of elements that I set attributes for:
> > <table border="1" cellpadding="3" cellspacing="0">..
> > <img align="middle">
> > Are there CSS equivalents for any of these?
> > Jeff

>
> <table style="border:1px #FFFFFF; padding:3px; margin:0px;">


Not quite - cellspacing is duplicated in CSS by border-spacing, not
margin (and even then only if border-collapse: separate is set).

And the padding should be on the tds, not on the table itself, to
duplicate the old cellpadding effect.

> <div syle="text-align:center"><img src="" alt="" /></div>


And 'align="middle"' on an image is vertical not horizontal alignment.

--
Chris
 
Reply With Quote
 
Pierre Goiffon
Guest
Posts: n/a
 
      07-13-2004
"SpaceGirl" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)
>> <table border="1" cellpadding="3" cellspacing="0">..

(...)
>> Are there CSS equivalents for any of these?


> <table style="border:1px #FFFFFF; padding:3px; margin:0px;">


I don't think the border="1" would be exactly reproduce by your border:1px
#FFFFFF; : this will just add a border around the table, not around each of
the cells...

 
Reply With Quote
 
Stan Brown
Guest
Posts: n/a
 
      07-13-2004
"SpaceGirl" <(E-Mail Removed)> wrote in
comp.infosystems.www.authoring.stylesheets:
>> <table style="border:1px #FFFFFF; padding:3px; margin:0px;">

>oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">


oops: "0px" is unnecessary; use "0".

oops: #FFFFFF is white. I think you want #000 if you're trying to
match <table> attributes.

The bigger issue is that probably padding should be in ems not
pixels. Otherwise, why use CSS at all when the <table> tag is
already the way he wants?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      07-13-2004
Jeff Thies wrote:
> There's a number of elements that I set attributes for:
>
> <table border="1" cellpadding="3" cellspacing="0">..
>
> <img align="middle">
>
> Are there CSS equivalents for any of these?
>
> Jeff



table {border: 1px solid black; border-spacing: 0px;}
td, th {padding: 3px;}
img {vertical-align: middle;}

Note that MSIE 5.x and MSIE 6 do not support border-spacing. So, until
the next upcoming MSIE 7 fixes that, you should either use
cellspacing="0" or add the declaration border-collapse: collapse; to
your CSS rule (for table) if you want to collapse borders.

DU
 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      07-13-2004
Stan Brown wrote:

>>oops: <table style="border:1px solid #FFFFFF; padding:3px; margin:0px;">

>
>
> oops: "0px" is unnecessary; use "0".
>
> oops: #FFFFFF is white. I think you want #000 if you're trying to
> match <table> attributes.
>
> The bigger issue is that probably padding should be in ems not
> pixels. Otherwise, why use CSS at all when the <table> tag is
> already the way he wants?


Yes I know what colour white is thank you. And the px *might* be
unrequired for zero values, but it's better than missing them off for
possive / negative values The OP was an obvious newbie, so I was
trying to make it easier...

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
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
are there Tomboy and F-Spot equivalents? Tshepang Lekhonkhobe Python 1 12-23-2006 05:52 AM
Special character to &abc equivalents Colin Peters ASP .Net 8 05-09-2005 01:45 AM
equivalents between MS and Borland C++ Allen F. C++ 3 02-09-2005 12:39 PM
Any digital equivalents of Olympus Stylus Epic? Alan D. Digital Photography 5 01-03-2004 09:24 PM
New to Python; Command equivalents Code_Dark Python 2 11-05-2003 12:32 PM



Advertisments