Page 1 of 1

How can I do this in CSS?

Posted: Mon Sep 01, 2003 8:08 pm
by rprins
Ok, I have a site that I am making for a hobby and I am trying to learn CSS along the way. I have the site the way I want it to sort of look now (w/ little CSS), except for some of the image work and some of the other style stuff. But, what I want to know is how I can make the news table (in the center) to look the same w/ CSS. Right now I use a lot of table rows and <img> tags and I have got to beleive that there is a better way w/ CSS. So, I will provide the link to the non CSS and CSS version plus the CSS for that part of the site.

Non-CSS The way I like it.
With CSS Needs work.

The CSS:

Code: Select all

table.news&#123;
border-style: solid;
border-color: #000000;
border-width: 1px;
border-spacing: 0px;
margin: 0px;
padding: 0px;
width: 450px;
&#125;
Any help that you can offer would be great! Thanks in advance.

Posted: Mon Sep 01, 2003 9:20 pm
by volka
start with

Code: Select all

table.news&#123;
	border-style: solid;
	border-color: #000000;
	border-width: 1px;
	border-spacing: 0px;
	margin: 0px;
	padding: 0px;
	width: 450px;
	margin-bottom: 15px;
&#125;

td.posted_by&#123;
font-size: 10px;
border-top: 1px solid black;
border-bottom: 1px solid black;
&#125;
margin-bottom, border-[top|bottom] appended.

You can set a background image with

Code: Select all

background-image:url(<url to image>);
in css.

Posted: Mon Sep 01, 2003 9:48 pm
by rprins
I never knew about that image thing. That will help a lot.

Also, what is an easier way to get that box around the table (the one in table.news) closer to the table it's self? Would it be easier to do a border-right and border-left for each TD?

Also, how to I get the spacing in between the cells closer together? I used to use cellspacing in HTML but how do I do it in CSS?

The help so far has been great! Thanks volka!

Posted: Thu Sep 04, 2003 4:40 am
by irealms
when i started with css i used the tutorials on http://www.webmonkey.com, helps me get to grips with it.

Posted: Mon Sep 08, 2003 5:07 pm
by rprins
I ended up just using a border: 1px white dashed. It worked for me and personally, I think it looks better. Thanks for the help fellas.