Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    153
    Rep Power
    13
    Hmm didn't work

    I got the following in the html

    Code:
    <th class='thtestimonial'>
    as in php coding like the following

    Code:
    Print "<tr><th class='thtestimonial'>Testimonial:</th> <td>&nbsp;".$testimonials['testimonial'] . "<br><br></td></tr>";
    The css is as following

    Code:
    th.thtestimonial {
    margin-top: -50px;
    }
    I tried
    Code:
    <th class="thtestimonial">
    in the coding but got error's as is in the php coding
  2. #17
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,846
    Rep Power
    6351
    in the coding but got error's as is in the php coding
    The errors may be handy.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #18
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    153
    Rep Power
    13
    Ok cool this is the error I got when I do it this way

    Code:
    <th class="thtestimonial">
    Parse error: syntax error, unexpected T_STRING in /customers/0/c/c/irhwebsites.co.uk/httpd.www/html5 think simple/testimonials.php on line 72

    on line 72 is the following

    Code:
    Print "<tr><th class="thtestimonial">Testimonial:</th> <td>&nbsp;".$testimonials['testimonial'] . "<br><br></td></tr>";
  6. #19
  7. JavaScript is not spelt java
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2011
    Location
    Landan, England
    Posts
    743
    Rep Power
    165
    Print "<tr><th class="thtestimonial">

    You cannot nest double-quotes inside double-quotes in this way. Change to 'thtestimonial' or \"thtestimonial\".

    Hint: I would use class 'testim' or some other more informative name - if you are constantly typing t-e-s-t-i-m-o-n-i-a-l you are sure to mistype it at some point
  8. #20
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    298
    Rep Power
    8
    The issue there is that you are trying to use double quotes within double quotes, so when the php gets to the 2nd double quote it reads it as the end of the string. So what should follow is a semi-colon or comma or concatenation or anything else you can use in conjunction with ending strings, but as we see, it follows with another string so this is the reason for the error.

    You definitely need single quotes around your class attribute's value.

    Regards,

    NM.
  10. #21
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    153
    Rep Power
    13
    I have done it a different way now - see link below

    http://irhwebsites.co.uk/html5%20thi...stimonials.php

    I just need a couple of link breaks after each testimonial and not sure how to do it, do I need something like

    PHP Code:
    echo "<br><br>"
    or will that not work
  12. #22
  13. JavaScript is not spelt java
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2011
    Location
    Landan, England
    Posts
    743
    Rep Power
    165
    Yes, that will insert line-breaks into the HTML.. if you insert it in the right place . Personally, I would use CSS

    Code:
    td {
        padding: 20px 0;
    }
    Last edited by AndrewSW; December 18th, 2012 at 04:49 PM.
  14. #23
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    153
    Rep Power
    13
    ok so use something like margin-bottom in css, that right?
  16. #24
  17. JavaScript is not spelt java
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2011
    Location
    Landan, England
    Posts
    743
    Rep Power
    165
    Code:
    td {
        padding: 20px 0;
    }
    Attached Images
  18. #25
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    153
    Rep Power
    13
    That css worked perfect, thank you so much really appreciate it and for all your help and time
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo