CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old December 18th, 2012, 03:41 PM
ianhaney ianhaney is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 91 ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 15 h 23 sec
Reputation Power: 11
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

Reply With Quote
  #17  
Old December 18th, 2012, 03:49 PM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Likely to be eaten by a grue.
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,791 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 14 h 53 m 20 sec
Reputation Power: 6112
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.

Reply With Quote
  #18  
Old December 18th, 2012, 03:52 PM
ianhaney ianhaney is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 91 ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 15 h 23 sec
Reputation Power: 11
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>";

Reply With Quote
  #19  
Old December 18th, 2012, 04:20 PM
AndrewSW's Avatar
AndrewSW AndrewSW is offline
JavaScript is not spelt java
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2011
Location: Landan, England
Posts: 743 AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 22 h 56 m
Reputation Power: 164
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

Reply With Quote
  #20  
Old December 18th, 2012, 04:22 PM
Nanomech's Avatar
Nanomech Nanomech is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Location: The Pleiades
Posts: 192 Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 23 h 7 m 18 sec
Reputation Power: 7
Send a message via Skype to Nanomech
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!"

Reply With Quote
  #21  
Old December 18th, 2012, 04:37 PM
ianhaney ianhaney is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 91 ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 15 h 23 sec
Reputation Power: 11
I have done it a different way now - see link below

http://irhwebsites.co.uk/html5%20th...estimonials.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

Reply With Quote
  #22  
Old December 18th, 2012, 04:47 PM
AndrewSW's Avatar
AndrewSW AndrewSW is offline
JavaScript is not spelt java
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2011
Location: Landan, England
Posts: 743 AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 22 h 56 m
Reputation Power: 164
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.

Reply With Quote
  #23  
Old December 18th, 2012, 04:48 PM
ianhaney ianhaney is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 91 ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 15 h 23 sec
Reputation Power: 11
ok so use something like margin-bottom in css, that right?

Reply With Quote
  #24  
Old December 18th, 2012, 04:51 PM
AndrewSW's Avatar
AndrewSW AndrewSW is offline
JavaScript is not spelt java
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2011
Location: Landan, England
Posts: 743 AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level)AndrewSW User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 22 h 56 m
Reputation Power: 164
Code:
td {
    padding: 20px 0;
}
Attached Images
File Type: png santas_padding.png (210.1 KB, 12 views)

Reply With Quote
  #25  
Old December 18th, 2012, 04:52 PM
ianhaney ianhaney is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 91 ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level)ianhaney User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 15 h 23 sec
Reputation Power: 11
That css worked perfect, thank you so much really appreciate it and for all your help and time

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Positioning an element [was: PHP Coding help]

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap