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 6 of 6
  1. #1
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Member #
    18755
    I've got an index.php....

    PHP Code:
    <?php
        
    include 'includes/header.inc.php';
    ?>
            <p>&nbsp;</p>
    <?php
        
    include 'includes/footer.inc.php'?>
    ... with header and footer includes. Should I have my CSS include in my index.php, or in the file that is using the style sheet; header.inc.php which is in the ../includes directory?

    I'm trying to assign a table to have a 5px border with a #333333 color.

    HTML Code:
     <tr style="border-top-color:#333333; border-top-width:medium">
    ... has not worked. Nor has creating a ".banner" class in my style sheet. The style sheet is in my index folder, and is linked into my header (in /includes/ directory)

    HTML Code:
    <link href="../style.css" rel="stylesheet" type="text/css">
    HTML Code:
    .banner {
    border-bottom-width: medium;
    border-bottom-color: #333333; }
    What's striking me most is that <tr class=".banner"> will not work either.

    Can a couple hundred sets of eyes tell me if I'm missing something simple?

    Thanks in advance.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    You really should not be using <table>s for layouts.

    But to answer your question, all CSS should be in the .css style sheet file.

    The server processes the PHP before serving the page, so the includes
    are treated just as though they are part of the web page.

    I'm thinking your style sheet would have this:

    tr.banner{
    border-top: 2px solid #333333;
    }

    Then ...
    <tr class="banner">

    Here is a better example (than I can come up with) of styling <table>s ...
    http://www.timrivera.com/tests/csstables.html


  4. #3
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Member #
    18755
    Quote Originally Posted by mlseim
    You really should not be using <table>s for layouts.

    But to answer your question, all CSS should be in the .css style sheet file.

    The server processes the PHP before serving the page, so the includes
    are treated just as though they are part of the web page.

    I'm thinking your style sheet would have this:

    tr.banner{
    border-top: 2px solid #333333;
    }

    Then ...
    <tr class="banner">

    Here is a better example (than I can come up with) of styling <table>s ...
    http://www.timrivera.com/tests/csstables.html
    The problem is, is that I resolved to trying it within my markup when my style sheet was failing. It seems as though somehow all styling is disabled.

  5. #4
    Senior Member Seldimi's Avatar
    Join Date
    Dec 2002
    Location
    Kozani, Greece
    Posts
    488
    Member #
    409
    First of all its <td class="identifier" (no .identifier)
    Try to use absolute url path for your css.. eg ..

    HTML Code:
    <link href="/style.css" rel="stylesheet" type="text/css">
    if its located on yourdomain.com/style.css
    - Webmaster's Planet . Greek Vortal For Webmasters ...
    - MyPortFolio - View My Creations

  6. #5
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Member #
    18755
    Well, the funny part is that it's showing up in Dreamweaver, but not in my browser.

  7. #6
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Member #
    18755
    I've redone the style sheet to include the following (style sheet is in my index.php directory -html)
    HTML Code:
    .banner {	
    		border-bottom-width: medium;
    		border-bottom-color: #CC9900;	
    }
    The class I have created is used in an include file, /includes/header.inc.php

    I am using the CSS for styling the middle border of a table (the divider). That is the only class that is not working, and I am using it within a table divider.

    HTML Code:
    <td class="banner">
    Any ideas or advice?


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 12:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com