Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
  1. #1
    Junior Member cancerkitty's Avatar
    Join Date
    Feb 2004
    Posts
    22
    Member #
    4891
    I have a page right now that uses a couple tables to spread out the information. I have one box on top with the title of the respective page in it that is colored red. It is surronded by a slightly larger box colored orange.

    What I want to do is put something in my external style sheet that would allow me to change the colors of all of these boxes on all of the pages at the same time; like you can do with font, text color, etc.

    I'm not really sure what these dollars things are good for just yet, but I'll throw five your way if you can help me get this going the way I want it.

    If you don't get my description, here's a link to the page I'm talking about: www.delsquacho.com

    Thanks
    And now you see that evil will always triumph, because good is dumb.
    www.delsquacho.com

  2.  

  3. #2
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    You can label a CSS style in any stylesheet attached to the page 'table' (no dot or hash), and every table you create in the page will have that default style... Is this what you mean?

    If you want to apply seperate styles to numerous tables, use a 'dot' in front of the style, as shown below also

    All you do is add the information into your stylesheet, in your HEAD tag, like so:
    Code:
    <head>
    <title>Site Title</title>
    <style type="text/css">
    table {
    information here
    }
    .table1 {
    table style one information here
    }
    .table2 {
    table style two information here
    }
    </style>
    </head>
    Hope this has helped.
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  4. #3
    Junior Member cancerkitty's Avatar
    Join Date
    Feb 2004
    Posts
    22
    Member #
    4891
    Can you show me how to code it, because I have no idea.

    This is how the table is laid out on the page:

    <table width="90%" border="0" cellspacing="4" cellpadding="4" align="center">
    <tr>
    <td width="90%" bgcolor="FF6600"> <table width="100%" border="2" cellpadding="4" cellspacing="0" bordercolor="#000000">
    <tr bgcolor="#000000">
    <td bgcolor="FF0000"> <b><font color="#FFFFFF" size="+2">News</font></b></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <table width="90%" height="78%" align="center" cellpadding="3" bordercolor="#CCCCCC">
    <tr>
    <td width="70%" height="80%"> <IFRAME SRC="news.htm" TabIndex=0 MarginWidth=0 MarginHeight=0 FrameBorder=0 Width="100%" Height="100%" Scrolling=yes border="2">
    </IFRAME></td>
    <td align="left" valign="top"><IFRAME SRC="news_side.htm" TabIndex=0 MarginWidth=0 MarginHeight=0 FrameBorder=0 Width="100%" Height="100%" Scrolling=no border="2"><br>
    </iframe>
    </p>
    </td>
    </tr>
    </table>


    I want to be able to change things, primarily colors for now, on these tables that I use on the entire site in one place.
    And now you see that evil will always triumph, because good is dumb.
    www.delsquacho.com

  5. #4
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    Step 1:
    Just give your <table> tags or <td> tags a "class" attribute... like so:
    <table class="classname"> or <td class="classname">

    Step 2:
    Put a link to an external stylesheet in your HTML code... like so:
    <link rel="stylesheet" type="text/css" href="filename.css">

    Step 3:
    Make a file named whatever you want, with the extension *.css, and put that file name in the "href" attribute of your link tag.
    Example: href="main.css"

    Step 4:
    Design your CSS code. Tutorials on CSS design can be found on w3schools.com, as well as Webmonkey.

    Here is an example someone would use for a basic table, so every page of their site could be streamlined with the same variables.
    Code:
    .table01 {
    background-color: #FFFFFF; //color of your table
    width: 300px; //width of your table
    height: 75px; //height of your table
    color: #FFFF00; //color of the font found in your table
    font-family: arial; //the font used in the table
    font-size: 12pt; //size of font used... pt,px,em, etc are common
    border: 1px solid black; //the border around the table
    }
    .table02 {
    background-color: #FFFF00; //color of your table
    width: 250px; //width of your table
    height: 50px; //height of your table
    color: #FFFFFF; //color of the font found in your table
    font-family: verdana; //the font used in the table
    font-size: 18px; //size of font used... pt,px,em, etc are common
    border: 1px dashed #000000; //the border around the table
    }
    From here, just plug the class name into the table you want to format.
    EX: <table class="table01"><tr><td>content...</td></tr></table>

    Anyway, I don't know how well this will help you, but... good luck!


  6. #5
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    google is know to help alot
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  7. #6
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    I'm pretty sure what I said would be the solution to the problem... If what I said isn't, this user is beyond able to be helped, lol.


  8. #7
    Junior Member cancerkitty's Avatar
    Join Date
    Feb 2004
    Posts
    22
    Member #
    4891
    Dude, that is exactly what I wanted, thanks a load.
    And now you see that evil will always triumph, because good is dumb.
    www.delsquacho.com

  9. #8
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    No problem! Who did you give the cash to by the way?

    I won't be upset if it wasn't me, but I'm curious!


  10. #9
    Junior Member cancerkitty's Avatar
    Join Date
    Feb 2004
    Posts
    22
    Member #
    4891
    I gave it to you.

    I got everything working right after about a half-hour of fussing around, not bad.
    And now you see that evil will always triumph, because good is dumb.
    www.delsquacho.com

  11. #10
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    Alright, sweet!

    That's what I'm here for, to help and be helped! If you ever need any help again, PM me on this and I'll gladly try my best!



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:23 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com