Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
embedding CSS in PHP, example, please look
embedding CSS in PHP, example, please look
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Kard63
Confirmed User
Join Date:
Nov 2003
Posts:
8944
Share
Post
#1
embedding CSS in PHP, example, please look
02-06-2007, 05:24 PM
print "<IMG STYLE="position:absolute; TOP:35px; LEFT:170px; WIDTH:50px; HEIGHT:50px" SRC="hair$hair.gif">";
Whats wrong with that line? thanks.
Chio
Confirmed User
Join Date:
Oct 2002
Posts:
8002
Share
Post
#2
02-06-2007, 05:25 PM
Originally posted by
Kard63
print "<IMG STYLE="position:absolute; TOP:35px; LEFT:170px; WIDTH:50px; HEIGHT:50px" SRC="hair$hair.gif">";
Whats wrong with that line? thanks.
I'm not a coder at all but maybe you need to escape out some of those characters?
I seo'd my hair yesterday and today it's pr7!
RIP Texas Dreams
Are you a content producer or program owner sick of tube sites? Contact me on ICQ: 39-183769
Comment
Post
Cancel
Kard63
Confirmed User
Join Date:
Nov 2003
Posts:
8944
Share
Post
#3
02-06-2007, 05:27 PM
the line:
print "<img src = hair$hair.gif>";
works. but when I try to add CSS it goes to shit.
Comment
Post
Cancel
DjSap
Confirmed User
Join Date:
Jul 2002
Posts:
3869
Share
Post
#4
02-06-2007, 05:29 PM
A. You do not fucking do that, all styles go into the CSS file, no hardcoding
print "<IMG class='imgstyle' SRC='hair$hair.gif'>";
Blog Themes, TGP Design, Writing Services, Grunt Work
ICQ: 66871495
Comment
Post
Cancel
naitirps
Confirmed User
Join Date:
May 2004
Posts:
761
Share
Post
#5
02-06-2007, 05:30 PM
try this:
echo "<IMG STYLE=\"position:absolute; TOP:35px; LEFT:170px; WIDTH:50px; HEIGHT:50px\" SRC=\"hair".$hair.".gif\">";
Programmer
ICQ
44035273 |
AIM
spritwork |
Email
spritian at spritian dot com
Comment
Post
Cancel
Kard63
Confirmed User
Join Date:
Nov 2003
Posts:
8944
Share
Post
#6
02-06-2007, 05:40 PM
Originally posted by
naitirps
try this:
echo "<IMG STYLE=\"position:absolute; TOP:35px; LEFT:170px; WIDTH:50px; HEIGHT:50px\" SRC=\"hair".$hair.".gif\">";
It worked beautifully. Thank you very much!
If you could explain I would cream my pants, but if you cant I am still insanely grateful. Thanks again.
Comment
Post
Cancel
octane
Confirmed User
Join Date:
Mar 2006
Posts:
32
Share
Post
#7
02-06-2007, 05:54 PM
you can't use the same type of quotes (in this case double quotes) inside the string you're trying to print without escaping them.
basically your print statement starts at the first double quote and ends at the next one, which was right after STYLE=, and that caused the error.
Comment
Post
Cancel
woj
<&(©¿©)&>
Join Date:
Jul 2002
Posts:
47882
Share
Post
#8
02-06-2007, 06:44 PM
Originally posted by
DjSap
A. You do not fucking do that, all styles go into the CSS file, no hardcoding
print "<IMG class='imgstyle' SRC='hair$hair.gif'>";
or just escape the -> " characters
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools:
Hosted Galleries Manager
Banner Manager
Video Manager
Wordpress Affiliate Plugin
Pic/Movie of the Day
Fansign Generator
Zip Manager
Comment
Post
Cancel
PHP-CODER-FOR-HIRE
Confirmed User
Join Date:
Nov 2006
Posts:
1090
Share
Post
#9
02-06-2007, 07:08 PM
Originally posted by
DjSap
A. You do not fucking do that, all styles go into the CSS file, no hardcoding
print "<IMG class='imgstyle' SRC='hair$hair.gif'>";
If you want to be like that, you shouldn't use single quotes in HTML attributes.
The ultimate correct way is like this:
echo '<img src="whatever.gif" class="super_pic" style="border: 1px solid red;" />';
Print is not required here, nor is escaping quotes.
Hire a PHP Coder
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment