Go Back   Site Help Forums > Authoring/Design > StyleSheets, DHTML, XML, etc.
User Name
Password


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-01-2003, 05:15 PM   #1
FatJoe2
Member
 
FatJoe2's Avatar
 
FatJoe2 is Offline:
Join Date: Jun 2003
Posts: 67
background img

How can I have background image for all table cell, but I want to create it CSS, so i dont' have to hard code very time

Thanks in advance
  Reply With Quote
Old 07-09-2003, 08:06 AM   #2
Parano.ID
Moderator
 
Parano.ID's Avatar
 
Parano.ID is Offline:
Join Date: Jul 2003
Location: Slovenia
Posts: 33
Not so hard to do.

If you want ALL the table cells in your page with same backround, you can do it in this way, for example:

td
{
background: url(images/picture.gif);
background-repeat: repeat-y; ----> repeating of image verticaly or hotizontaly, if not defined, picture will not repeat
background-color: #ffffff;
}

And, if you want just some specific table cell to have some other image, you use ID or CLASS selector, like this:

td.specialcell
{
width: 140px;
background: url(images/special.gif);
background-repeat: repeat-y;
background-color: #ffffff;
}



Hope this helps

BGUD
  Reply With Quote
Old 07-09-2003, 09:46 AM   #3
FatJoe2
Member
 
FatJoe2's Avatar
 
FatJoe2 is Offline:
Join Date: Jun 2003
Posts: 67
Hi Parano.ID,

Thank you for your tips

I have a question thou.

If I have .td, then I don't actually call .td class everytime I use td, correct?

But if you have td.specialcell class, then how can I specify a cell that I want to use this class.

Ex. If I have .main class in CSS, so whenever I want to use it, I use class=main, right? I'm not sure how to call td.specialcell

Thanks for your help
  Reply With Quote
Old 07-10-2003, 02:05 AM   #4
Parano.ID
Moderator
 
Parano.ID's Avatar
 
Parano.ID is Offline:
Join Date: Jul 2003
Location: Slovenia
Posts: 33
Hey Joe!

I understand what you think. It is like this.

When you write your (x)html page you use tags, such as BODY, TD, FORM, A, BR, and so on.

So when you are writing a css file, you have to declare to which tag you want to define a display settings.

When you want to declare it for standard html tags ( for example the TD tag ) you just use TD{} ( with no dot in front of it ), if you declare a CLASS to your TD than you use .TD{} and when you declar ID to your tag you use #TD{} in your css.

I have attached a sample.html file in this post for example, it is in xhtml format. File is txt because this board doesn't allow to upload html files, so you just need to change its ending to html.

All you have to know is that if you define style for TD class, all table cells will have same style except you define them a ID or CLASS with different style.

So, in my example we have 3 TD tags, two of them with defined class or id. Well, when I styled a TD class I styled all of the cells in my page ( notice that the blue cell still has red border as I have defined it for all TDs ), then I styled a cell with CLASS="red" with red color and dotted black border, lastly I styled cell with with blue background but didn't defined any border, so it stays red as I defined it for all TD tags.

I know this can be a little confusing as I am not very good teacher

Hope it helps,

BGUD
Attached Files
File Type: txt sample.txt (1.0 KB, 49 views)
  Reply With Quote
Old 07-10-2003, 04:33 PM   #5
NancyS
Registered User
 
NancyS's Avatar
 
NancyS is Offline:
Join Date: Jun 2003
Location: New York, NY
Posts: 82
i probably try that too, you're a CSS guru, Parano.ID!
__________________
NancyS
The Good, The Hot, The Sexy
  Reply With Quote
Old 07-11-2003, 02:23 AM   #6
Parano.ID
Moderator
 
Parano.ID's Avatar
 
Parano.ID is Offline:
Join Date: Jul 2003
Location: Slovenia
Posts: 33
i am still learning all this stuff and i realized that it is best for me and for the web itself if i use xhtml and css from my day one of designing and developing web sites + xml in which i am in love

And yes, i am CSS guru, there is no thing you can't do with it.
And designs created with css+div alone are just much better and good looking than those with inline styles and tables.

if you need any help regarding any of these technologyes ( and other ) feel free to ask, i like to help

BGUD
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump




All times are GMT -5. The time now is 12:56 PM.

Powered by: vBulletin Version 3.0.0
Copyright ©2000 - 2004, Jelsoft Enterprises Ltd.

Sponsored By:
Music Shopping, Ink Refills, Cruets Gifts,Viagra

Proudly Hosted By: iValueHost, LLC

Site Help Forums - powered by vBulletin News


Remember, White Hat SEO services are essential for a website to succeed in attaining top ranking in search engines. Top SEO services providers take a note on legal services for optimizing a site. Side-by-side they also keep a check on the illegal Black Hat SEO techniques as they can spoil the effort rendered through sincere SEO services.
Cool Website Templates. The content on this site may not be reused or republished. © 2005 - 2010 - All Rights Reserved
This design template from Cool Website Templates portal. Cool Website Templates