css tables

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

css tables

Post by pinehead18 »

I'm needing to learn how to make css tables. Does anybody know a good website that has a tutorial or howto on how to create a css table. It needs to have details on bordering and how to create a right border and left top and so on.

Thanks
Anthony
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

<html>
<head>

<style type="text/css">
p
{
border-right: dashed #cccccc;
border-right-width: 2px
}
</style>

<body>

<p>Test</p>

</head>

</body>
</html>

I have that however i need to be able to specify the width and height. Any suggestions on making this into an actual table?

Thanks
ANthony
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

you can't change a paragraph into an table, but you could create borders around it, etc..

Code: Select all

<html>
<head>

<style type="text/css">
p
&#123;
border-right: dashed #cccccc;
border-right-width: 2px
width: 400px; height: 300px;
background-color: #00000; color: #FFFFFF;
&#125;
</style>

<body>

<p>Test</p>

</head>

</body>
</html>
User avatar
llanitedave
Forum Commoner
Posts: 78
Joined: Thu Jan 15, 2004 11:24 am
Location: Las Vegas, NV.

Post by llanitedave »

And of course, if you want to position it on the page, you can do that too...
vigge89 wrote:you can't change a paragraph into an table, but you could create borders around it, etc..

Code: Select all

<html>
<head>

<style type="text/css">
p
&#123;
position: absolute; top: 100px, left: 50px;
border-right: dashed #cccccc;
border-right-width: 2px;
width: 400px; height: 300px;
background-color: #00000; color: #FFFFFF;
&#125;
</style>

<body>

<p>Test</p>

</head>

</body>
</html>
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

Simplify this even more.

Code: Select all

<style type="text/css">
p.test /* class */
#test /* id */
{
position: absolute;
top: 100px;
left: 50px;
border-right: 2px dashed #ccc;
width: 400px;
height: 300px;
color: #fff;
background: #000;
}
</style>

<p class="test">Test</p>

or

<p id="test">Test</p>
For xHTML use lower case, as all characters are CASE sensitive. All evenly distributed numbers in CSS can be simplified to a 3 digit value.

When using global CSS values, a P for instance, add a class or id value so not to disturb all P's.
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

Post by phait »

suggest you try here:
http://www.dezwozhere.com/links.html for tips and tuts whether you're a beginner or a experienced css coder. every day is a schoolday on this site.
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

I found an awesome site on doing this a while back, stand by and I may post the link if I find it.
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

w00t! haha. not more than a minute after posting the previous I found it.

http://www.projectseven.com/tutorials/c ... /index.htm
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

nig, you have earned yourself a jelly doughnut for your outgoing choice of harsh brutal actions.

8)
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

now just what is that supposed to mean timmy? hope you're not trying to instigate a fight, cause I'm ready, oh yea....
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

meet me behind the slide at recess time.

we'll settle this

:twisted: :wink: :twisted:
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

you're on buddy...
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

better bring an army and some fruit juice, cause its on like donkey kong!!!

:!:
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

*smacks forehead*

doh!
Post Reply