CSS Files..

Discussion in 'OT Technology' started by Leb_CRX, Oct 24, 2003.

  1. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    I am redoing my website...anyways my problem will be a bit hard to explain, but here it goes...I have a CSS file listed below with two classes/IDS, TOC (table of contents), and mainText...I want the background of where mainText is used to be a differant color then everywhere else, so I put " background-color: purple;" (purple for testing..heh) and when I do that the whole background of the document is becoming pruple, I just want that table to become purple....i'll paste the CSS file, and the HTML file...I been fiddling with this for a bit, looked at other examples, can't seem to fix it, probally something stupid (person typing this...heh) but I can't get it going..

    Code:
    --------CSS FILE-------
    
    #toc, body{
    	font-family: Arial, Geneva, sans-serif;
    	font-size: 84%;
    	color: #000;
    	background-color: White;
    	text-align: center;
    },
    
    #toc, a:link, a:visited, a:active {
    	text-decoration: none;
    	color: #546A82;
    },
    
    #toc, A:Hover {
    	text-decoration: none;
    	color: #8BA1B9;
    },
    
    #maintext, body{
    	font-family: Arial, Geneva, sans-serif;
    	font-size: 84%;
    	color: #000;
    	text-align: center;
    	background-color: purple;
    	border : 1px solid Black;padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; text-indent: 2pt;
    }
    
    body
    {
    	font-family: Arial, Geneva, sans-serif;
    	font-size: 84%;
    	color: #000;
    	background-color: White;
    	text-align: center;	
    }
    ----END OF CSS FILE-------
    
    =========HTML FILE=========== (some)
    
    <TABLE>  
      <TR>
        <TD ALIGN="CENTER">
          <TABLE>
    	    <TR>
              <TD ALIGN="CENTER">
    				<IMG alt = "" src="images/header_top.jpg"><BR>
    				<IMG alt = "" src="images/header.jpg" >
    		  </TD></TR></TABLE><BR>
          <TABLE WIDTH="100%">
            <TR>
              <TD WIDTH="10%" ALIGN="CENTER" CLASS="toc">
    		  		<a href = news.shtml>.:News:.</a><BR>
    				<a href = portfolio.shtml>.:Portfolio:.</a><BR>
    				<a href = resume.shtml>.:Resume:.</a><BR>
    				<a href = links.shtml>.:Links:.</a><BR>
    				<a href = contact.shtml>.:Contact:.</a><BR>
    			</TD>
              <TD WIDTH="90%" ALIGN="CENTER" CLASS="maintext">....</TD></TR></TABLE>
      </TD></TR></TABLE><BR><BR>
    
    =======/HTML FILE===========
    
    
     
  2. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    I figured it out, also came to the conclusion that the whole internet (belive me, I went through it word for word) has no good topics relating to CSS

    thank you offtopic, after reading so many tutorials, I decided to view the source (which by the way i've done on many sites, a lot of them are confusing) and I noticed how to get it to work....

    2 hours later :wtc:
     
  3. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    This is how its done with web development :)

    I did this with rsbauer.com. Spent a lot of time, but I learned a lot too... Its healthy and natural to do this. Just don't copy the entire design.
     

Share This Page