 |
 |
replace "cellspacing" with CSS?
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2002
Location: Silicon Valley
Status:
Offline
|
|
is there any CSS tag I can use to replace the table html tag "cellspacing="0""??????????
|
Anyone who would letterspace blackletter would steal sheep. - Frederic Goudy
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status:
Offline
|
|
...are you still intending on placing your data into a table for layout purposes? just use a div instead...you can then adjust padding or margin to suit your needs, probably margin if you want to mimic cellspacing.
if you still intend on using a table, i think you would have to apply margin to a TD and not the whole table...
anyways, it seems silly to find a css replacement for cellspacing if you're going to continue to use a table (if it for layout purposes)...just use the html attribute; you know it'll work in everything since the birth of netscape...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2002
Location: Silicon Valley
Status:
Offline
|
|
Can you put borders on(like a line on the left side) with a DIV?
|
Anyone who would letterspace blackletter would steal sheep. - Frederic Goudy
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status:
Offline
|
|
Originally posted by Webscreamer:
Can you put borders on(like a line on the left side) with a DIV?
...but of course (though it depends on how much you like your netscape < 5 users):
<style>
#boxWithLeftBorder {
border-left:1px solid black;
}
</style>
<div id="boxWithLeftBorder">This would be an example of a box with a left border...much prettier looking code than a multi column table...</div>
...the ideal would be to separate your content from your style completely, so that you basically have chunks of content and their placement and style is determined by the stylesheet. it's a tough switch from tables to css...i'm currently experimenting to switch one of the sites i manage, nyu.edu, to a non-table layout. there are a bit more politics involved in that switch being that we still have a large population of netscape 4 users and the old table based layout still works perfectly for them. the downside is that in the next two years when we plan a redesign, it'll be a huge pain in our (my) butts to convert the multiple thousand or so pages with the nyu look. with css, you just redefine your info in one spot and instantly your site has been upgraded.
anyways, it's good to learn and use where you know you and your users will benefit from the switch equally.
some good resources for css matters can be found at:
-- jeffrey zeldman, and his site
-- a list apart.
anyways, good luck.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2002
Location: Silicon Valley
Status:
Offline
|
|
Hey, my girlfriend wants to go to NYU ;p
can I split a div into colums? I know it defeats the purpose probably ;0
there any good tuorials on this? I have been using tables and when I start converting, I run into probs and I think I needs tables.
|
Anyone who would letterspace blackletter would steal sheep. - Frederic Goudy
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status:
Offline
|
|
Originally posted by Webscreamer:
Hey, my girlfriend wants to go to NYU ;p
...she should beware, they just increased tuition 6.5%...~$40K a year. but depending on what she wants to study, new york is an awesome place...just not for webdesigners/programmers looking for a job.
can I split a div into colums? I know it defeats the purpose probably ;0
there any good tuorials on this? I have been using tables and when I start converting, I run into probs and I think I needs tables.
sure, you can do something like this (though using tables might be quicker if you have a deadline):
<style>
#container {
/* style declarations here */
}
#left {
float: left;
/* style declaration here */
}
#right {
/* style declaration here */
}
</style>
<div id="container">
<div id="left">Left column content...</div>
<div id="right">Right column content...</div>
</div>
i haven't tried this, but it should work...
check out A List Apart in their previous issues. you can sort different articles and tutorials by subject. there are a few on moving to a non-table layout.
before long, you'll become obsessed with making your pages in this style...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2002
Location: Silicon Valley
Status:
Offline
|
|
what is this " #" stuff in the CSS with divs?? can't you just put .whatever?
and in a div, u have to us ID, or can u just use class?
|
Anyone who would letterspace blackletter would steal sheep. - Frederic Goudy
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status:
Offline
|
|
Originally posted by Webscreamer:
what is this " #" stuff in the CSS with divs?? can't you just put .whatever?
and in a div, u have to us ID, or can u just use class?
you can use classes too...id is usually for something that you only have one of and classes should be used when you apply the same style multiple times to various pieces...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Dec 2002
Location: Amsterdam, Netherlands
Status:
Offline
|
|
slightly offtopic: if I understand correctly, it is possible to change every type of table to a <div>-structure?
If so, can you provide an example and for instance change the following table to the <div>-equivalent?
Code:
<table border="1" cellspacing="2" cellpadding="2">
<tr height="20%">
<td colspan="2" width="100%">r1c1</td>
</tr>
<tr height="80%">
<td width="40%">r2c1</td>
<td width="60%">r2c2</td>
</tr>
</table>
rendered to:
<table border="1" cellspacing="2" cellpadding="2">
<tr height="20%">
<td colspan="2" width="100%">r1c1</td>
</tr>
<tr height="80%">
<td width="40%">r2c1</td>
<td width="60%">r2c2</td>
</tr>
</table>
|
I'm Appleless and unhappy: tiBook is dead and iPod stolen
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Quoted
Join Date: Apr 2001
Location: San Francisco
Status:
Offline
|
|
|
(Last edited by daimoni; Jul 10, 2004 at 09:30 AM.
)
|
|
.
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|