The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
Page 2 -
Positioning an element [was: PHP Coding help]
Page 2 - Discuss Positioning an element [was: PHP Coding help] in the CSS Help forum on Dev Shed. Positioning an element [was: PHP Coding help] Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 18th, 2012, 03:41 PM
|
|
|
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> ".$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
|

December 18th, 2012, 03:49 PM
|
 |
Likely to be eaten by a grue.
|
|
Join Date: Oct 2006
Location: Pennsylvania, USA
|
|
Quote: 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.
|

December 18th, 2012, 03:52 PM
|
|
|
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> ".$testimonials['testimonial'] . "<br><br></td></tr>";
|

December 18th, 2012, 04:20 PM
|
 |
JavaScript is not spelt java
|
|
Join Date: Feb 2011
Location: Landan, England
|
|
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 
|

December 18th, 2012, 04:22 PM
|
 |
Contributing User
|
|
Join Date: Aug 2011
Location: The Pleiades
|
|
|
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.
__________________
"WERE NOT WORTHY!"
"WERE NOT WORTHY!"
|

December 18th, 2012, 04:37 PM
|
|
|
|

December 18th, 2012, 04:47 PM
|
 |
JavaScript is not spelt java
|
|
Join Date: Feb 2011
Location: Landan, England
|
|
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.
|

December 18th, 2012, 04:48 PM
|
|
|
|
ok so use something like margin-bottom in css, that right?
|

December 18th, 2012, 04:51 PM
|
 |
JavaScript is not spelt java
|
|
Join Date: Feb 2011
Location: Landan, England
|
|
Code:
td {
padding: 20px 0;
}
|

December 18th, 2012, 04:52 PM
|
|
|
|
That css worked perfect, thank you so much really appreciate it and for all your help and time
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|