Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jun 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    footer not accepting .css coding due to include file having it's own .css

    footer not accepting .css coding due to include file having it's own .css

    Here's my HTML code
    Code:
    <div id="content">
      <div>
      <br />
      <blockquote>
      <h2>Links Page</h2>
      <a href="form.php">Submit your Website</a><br /><br />
      <?php include ("links.php")?>
      </blockquote>
      </div>
    <div style="clear: both;">&nbsp;</div>
    </div>
    
    <div id="footer">
    <p>&copy; 2009 <a href="../index.php">Example.com</a> <a href="../contact-us.php">Contact Us</a> <a href="../privacy-policy.php">Privacy Policy</a>
    Here's my CSS Code
    Code:
    /* Footer */
    
    #footer {
    	width: 850px;
    	height: 25px;
    	margin: 0 auto;
    	background: #808080;
    	font-size: smaller;
    	text-align: center;
    }
    
    #footer * {padding: 5px 5px 5px 5px; color: blue;}
    #footer a:link {text-decoration: none; color: blue;}
    #footer a:visited {text-decoration: none; color: blue;}
    #footer a:hover {text-decoration: none; color:red;}
    This coding works on every page of my website except this 1 page which includes another file which has it's own .css file. When I look at the .css of the master page it only shows this code, not that of the included file. So I think the correction is somewhere in the HTML Code
    Last edited by stub; 06-22-2009 at 09:28 AM.

  • #2
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Missing </div>?

    Quote Originally Posted by stub View Post
    <div id="footer">
    <p>&copy; 2009 <a href="../index.php">Example.com</a> <a href="../contact-us.php">Contact Us</a> <a href="../privacy-policy.php">Privacy Policy</a>
    I don't see a </div> to close the <div id="footer">. Could that be your problem?

    It would help to see the PHP code that adds the CSS to this page.

    Also, I assume the "HTML code" is in a .php file, right (or at least in a file that will be passed to a PHP interpreter)?

  • #3
    New Coder
    Join Date
    Jun 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry,

    The closing footer </div> is there. It got omitted erroneously. Yes the HTML code is in a PHP file.

    Here's the .css of the included page..
    Code:
    body, td, p {
    	background-color : #FFFFFF;
    	color : #000000;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 11px;
    }
    
    td.head {
    	background-color : #336699;
    	color : #FFFFFF;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 12px;
    	font-weight : bold;
    }
    
    td.glava {
    	background-color : #336699;
    	color : #FFFFFF;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 11px;
    }
    
    td.copyright {
    	background-color : #336699;
    	color : #FFFFFF;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 9px;
    }
    
    td.vmes {
    BORDER-RIGHT: #336699 1px solid;
    BORDER-TOP: #336699 1px solid; 
    background-color: #FFFFFF; 
    BORDER-LEFT: #336699 1px solid; 
    BORDER-BOTTOM: #336699 1px solid
    }
    
    td.dol {
    BORDER-RIGHT: #336699 2px solid;
    BORDER-TOP: #336699 2px solid; 
    background-color: #FFFFFF; 
    BORDER-LEFT: #336699 2px solid; 
    BORDER-BOTTOM: #336699 2px solid;
    }
    
    td.sec{
    	background-color:#F4F4F4;
    }
    
    a {
    	color : blue;
    	text-decoration : underline;
    }
    
    a.copy {
    	color : White;
    	text-decoration : underline;
    }
    
    a.link {
    	font-size : 10px;
    }
    
    a:hover {
    	color : #FF0000;
    	text-decoration : none;
    }
    
    a.copy:hover {
    	color : yellow;
    	text-decoration : none;
    }
    
    font.header {
    	color : #FFFFFF;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 12px;
    	font-weight : bold;
    }
    
    font.notice {
    	color: #FF0000;
    }
    
    hr {
    	height: 0; 
    	border: 0; 
    	border-top: 1px solid #8080FF; 
    }
    
    p.head {
    	color : #000000;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 14px;
    	font-weight : bold;
    }
    
    input {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size:12px;
    	color:#000000;
    	border-top:1px solid #1162B6;
    	border-left:1px solid #1162B6;
    	border-right:1px solid #1162B6;
    	border-bottom:1px solid #1162B6;
    	background:#FFFFFF;
    }
    
    td.first {
    	background-color : #FFFFFF;
    	color : #000000;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 10px;
    }
    
    td.second {
    	background-color : #F4F4F4;
    	color : #000000;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 10px;
    }
    
    span.tip {
    	color : Green;
    	font-size : 11px;
    	font-weight: bold;
    } 
    
    img.line {
    	border: 1px solid #009900;
    	vertical-align: text-bottom;
    }
    Last edited by stub; 06-22-2009 at 09:29 AM.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Please post your complete html+CSS taken from browser's view source option. Or a link to your page would be much better!

    PS: Use [CODE][/CODE] tags around your codes while posting here. You may edit your above posts.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Jun 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here's the link:

    Here's what every other page looks like:
    Last edited by stub; 06-22-2009 at 11:31 PM.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    footer not accepting .css coding due to include file having it's own .css
    Since you haven't specified which rule is getting ignored, I assume you are talknign about the background color of footer.

    In your index.php file you have
    Code:
    body, td, p {
    	background-color : #FFFFFF;
    	color : #000000;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 12px;
    }
    which is overriding the background color applied in your default.css file
    Code:
    #footer {/*default.css (line 132)*/
    background:#808080 none repeat scroll 0;
    font-size:smaller;
    height:25px;
    margin:0 auto;
    text-align:center;
    width:850px;
    }
    . Or in other words, the <p> takes the #ffffff background, and thus it hides the background applied on #footer.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New Coder
    Join Date
    Jun 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually, it's most the footer rules in default.css which is being ignored, afaict. Removing the <p> </p> fixed the background but there are still a couple of problems. 1) No blue copyright, 2) Not the right size, 3) Not aligned correctly. Fixed 1) with <font color="blue">. So still need solution to 2) & 3). Or a whole better solution.
    Last edited by stub; 06-22-2009 at 10:43 PM.

  • #8
    New Coder
    Join Date
    Jun 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Got it fixed now. Thanks for your help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •