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 9 of 9

Thread: Please Help!!!

  1. #1
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    I have a php "page" that's going to be used as an include as a top menu.

    I need to edit the following php code:

    .tbutton:hover{
    font: Bodoni MT;
    color: white;
    background-color: #FF6600;
    }

    in such a way that the green cell itself is clickable. I'd like the cell itself to have the same link ability as the "Copyright" text. Click this this link for the page.

    Also somewhat unrelated: if I were to change the font above to something like "Algerian"...the text change doesn't take effect. I use Frontpage, unfortunately...

    Please help.

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Ok, first, that's CSS, not PHP. Second, you won't be able to edit that to make the element clickable. You'll have to edit the HTML for that. Third, the font thing isn't working because it's incorrectly formatted and/or the font may not be on your system.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    1.) I just realized that it's technically CSS. In my defense, the coding is php. Honest mistake (for the record, I believe the CSS board is more active than the php board).
    2.)Where/how do I edit that part in the actual html? please help ;( .
    3.) The font is definately in the system....and I've tried other ones too...I picked "Algerian" b/c it was the most "different" looking. None have worked though.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    Using FrontPage is going to be a problem.
    I'm not sure how FP deals with embedded PHP, and FP sucks nonetheless.
    You can open your HTML/scripts and edit using Notepad (by hand), or notepad++ (google it).

    Save the script below as "test.php", upload it and view it online.

    PHP Code:
    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 2</title>

    <style type="text/css">
    html, body{
    margin:0px auto;
    width:900px;
    text-align:center;
    }

    img {border:none;}

    #box-container{
    width:900px;
    height:166px;
    }
    .box {
    float:left;
    text-align:center;
    background-color:#000;
    font-family:arial;
    font-size:14pt;
    color:#fff;
    display: block;
    width:153px;
    height:166px;
    }
    .box0 {
    float:left;
    text-align:center;
    background-color:#000;
    font-family:arial;
    font-size:14pt;
    color:#fff;
    display: block;
    width:258px;
    height:166px;
    }
    .box1 {
    background-color:#000;
    font-family:arial;
    font-size:14pt;
    color:#fff;
    display: block;
    width:153px;
    height:166px;
    text-decoration:none;
    line-height: 140px;
    }
    a.box1:hover {
    background-color:#00a000;
    font-family:arial;
    font-size:14pt;
    color:#fff;
    }
     
    .date {
    float:left;
    text-align:center;
    background-color:#000;
    font-family:arial;
    font-size:14pt;
    color:#fff;
    display: block;
    width:250px;
    height:166px;
    line-height: 140px;
    }
    </style>
    </head>

    <body>

    <div id="box-container">

    <div class="box0">
    <a href="google.com"><img src="http://moonshinemediallc.com/images/mmlogo1.png"></a>
    </div>
    <div class="box">
    <a href="google.com" class="box1">Copyright</a>
    </div>
    <div class="box">
    <a href="copyediting.php" class="box1">Copyediting</a>
    </div>
    <div class="date">
    <?php echo date("l F jS, Y");?>
    </div>
    <div style="clear:both;"></div>

    </div>

    </body>
    </html>
    It uses no javascripting for navigation. It uses PHP for date functions.


  6. #5
    Junior Member
    Join Date
    Apr 2012
    Posts
    12
    Member #
    31568
    Quote Originally Posted by acegreen, post: 234357
    1.) I just realized that it's technically CSS. In my defense, the coding is php.
    It's technically CSS... and the coding is CSS. If by chance the CSS is within a PHP page inside <?php ?> then it is most likely poorly written code.

  7. #6
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    Quote Originally Posted by abda53, post: 234447
    It's technically CSS... and the coding is CSS. If by chance the CSS is within a PHP page inside <?php ?> then it is most likely poorly written code.
    Sorry for the late reply...but what if it's intended to be used as an include file?

    Like: <?php include("header.php"); ?>

    It seems to works at the moment, but you have me worried....

  8. #7
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    It'll work, but CSS should be in its own file.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  9. #8
    Junior Member
    Join Date
    Apr 2012
    Posts
    12
    Member #
    31568
    Quote Originally Posted by acegreen, post: 234481
    Sorry for the late reply...but what if it's intended to be used as an include file?

    Like: <?php include("header.php"); ?>
    Like Ronald Roe said, it should be in it's own .css file. That file normally is put into the header file, which is normally included in all pages.

    This example shows you how easy a hover is
    http://pastebin.com/b5s02bcd
    added lines: 28-30
    modified line: 52

    Please read this as well
    http://www.tizag.com/cssT/external.php

  10. #9
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    Awesome...finally figured that out.

    The html, body { ;} threw me off...as did figuring how to decipher pastebin.com (haven't used it before). But mea culpa on both counts.


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