User Name
Password
AppleNova Forums » Programmer's Nook »

Add picture to (CSS/HTML) stylesheet


Register Members List Calendar Search FAQ Posting Guidelines
Add picture to (CSS/HTML) stylesheet
Thread Tools
T-Man
The Hoarding Packrat™
 
Join Date: Oct 2005
 
2008-06-24, 21:17

Firstly, pardon any probable noobness – I've never worked with such 'advanced' HTML, and not at all with CSS.

The problem: I'm trying to make MySpace look a little prettier (it's unfortunately the communication medium of the teenage ), and I want to add a picture to a stylesheet I already have. But I know nothing about CSS except from the code I have here, which is photoless thus I can't just copy the code like I did to add another table (which felt like such an accomplishment, not knowing any of this stuff by heart ).

HTML:
Code:
<div class="content-b"> <div class="content-interests"> <h2>Interests</h2> <p>my interests here</p> <p>some title <img src="http://usualtypeofHTMLlinkblahblahblah,jpg"> </p> </div>
Should a <br /> go after "some title" ? That space-slashed break is used similarly in a list elsewhere in the code and so I ask. When I did try using it, I got the two periods where picture 'should' be ; the way it is above gets the blue question mark placeholder. Should there be another <p> ?

CSS:
Code:
.content-b h2 { color:2a343d; } .content-b p { font-size:1.1em; line-height:1.5; } .content-interests { float:left; width:227px; margin-left:30px; margin-right:10px; _margin-left:15px; }
Since I have the HTML link code the way MySpace likes it, I assume that the reason I just get ".." or the blue question mark square is because nothing refers to it in the CSS code ?..

Anyone want to help ?


PS: why have, for example, margin-left:... and _margin-left:... ?

PPS: in case some of you out there aren't above the übersocial MySpace, here's what I'm using if you're interested in deüglifyment: http://www.mys. . .le.
  quote
jdcfsu
Veteran Member
 
Join Date: Jun 2006
Location: Florida
 
2008-06-24, 21:29

If you're getting a blue question mark it just means that the reference to your image is borked. So check you <img src="blah" /> code.
  quote
rollercoaster375
Senior Member
 
Join Date: Mar 2005
Location: UIllinois (Champaign, IL)
Send a message via AIM to rollercoaster375 Send a message via MSN to rollercoaster375 Send a message via Yahoo to rollercoaster375 Send a message via Skype™ to rollercoaster375 
2008-06-24, 21:51

Quote:
Originally Posted by T-Man View Post
HTML:
Code:
<div class="content-b"> <div class="content-interests"> <h2>Interests</h2> <p>my interests here</p> <p>some title <img src="http://usualtypeofHTMLlinkblahblahblah,jpg"> </p> </div>
Should a <br /> go after "some title" ?
No. MySpace does not use XHTML, this <br /> should *never* be used. <br> is not needed, however, as <img> is an inline-block element, that is, outside of the element it is treated as a block [In other words, it creates newlines at the beginning and end of the element]

Quote:
Originally Posted by T-Man View Post
That space-slashed break is used similarly in a list elsewhere in the code and so I ask. When I did try using it, I got the two periods where picture 'should' be ; the way it is above gets the blue question mark placeholder. Should there be another <p> ?
No. The code is fine as is.

Quote:
Originally Posted by T-Man View Post
CSS:
Code:
.content-b h2 { color:2a343d; } .content-b p { font-size:1.1em; line-height:1.5; } .content-interests { float:left; width:227px; margin-left:30px; margin-right:10px; _margin-left:15px; }
Since I have the HTML link code the way MySpace likes it, I assume that the reason I just get ".." or the blue question mark square is because nothing refers to it in the CSS code ?..
No, as the previous poster explained, your link is broken.

Quote:
Originally Posted by T-Man View Post
PS: why have, for example, margin-left:... and _margin-left:... ?
Inserting an underscore prior to a CSS element is a common practice used to send certain code to Internet Explorer, and certain code to compliant browsers.

I really have nothing to put here, but I feel it's rather strange to not have one.
  quote
T-Man
The Hoarding Packrat™
 
Join Date: Oct 2005
 
2008-06-25, 06:44

Well, annoying since I've tried that with two (the address to a Flickr and Picasa image) images and got the same result. I'll go upload somewhere else and try it.

Someone didn't know about MySpace and XHTML it seems.
Code:
<div class="content-vitals"> <h2>Infos</h2> <p>Age » <br /> Height » Five <br /> Status » <br /> Hometown » <br /> Orientation » <br /> Here for » <br /> Education » <br />
(But the rest must be X-less, since it all works fine...)
Are they harmful, or just ignored ?

Hm, IE... So if I want my page to show up fine for all of my IE friends (about *all* of my friends sadly), I'll have to edit those things too.... (For the love of Zeus get a Mac ! . .or Safari on Windows.)
  quote
rollercoaster375
Senior Member
 
Join Date: Mar 2005
Location: UIllinois (Champaign, IL)
Send a message via AIM to rollercoaster375 Send a message via MSN to rollercoaster375 Send a message via Yahoo to rollercoaster375 Send a message via Skype™ to rollercoaster375 
2008-06-26, 15:13

Quote:
Originally Posted by T-Man View Post
Well, annoying since I've tried that with two (the address to a Flickr and Picasa image) images and got the same result. I'll go upload somewhere else and try it.

Someone didn't know about MySpace and XHTML it seems.
Code:
<div class="content-vitals"> <h2>Infos</h2> <p>Age » <br /> Height » Five <br /> Status » <br /> Hometown » <br /> Orientation » <br /> Here for » <br /> Education » <br />
(But the rest must be X-less, since it all works fine...)
Are they harmful, or just ignored?
It's harmful to the intent of the specification, but it doesn't have a hard, practical impact. Browsers are used to crap code like that which is found on MySpace, thus they can handle <br /> with a declared HTML doctype, but it's still not good practice to use XHTML syntax in an HTML document.

I really have nothing to put here, but I feel it's rather strange to not have one.
  quote
T-Man
The Hoarding Packrat™
 
Join Date: Oct 2005
 
2008-06-26, 21:55

I shall take it out then to be codeally etiquette.

MySpace = crapcode... I like. If only all would see the light.
  quote
Posting Rules Navigation
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

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Dealing with ADD (non-Hyperactive Variety) Moogs AppleOutsider 49 2007-12-30 22:25
Can't Add Printer? Joshua Genius Bar 18 2005-12-10 13:49
Final Cut Express - How do I add a good Soft Focus? Gizzer Genius Bar 0 2005-11-28 08:03
Lousy Picture on Apple Site doublem9876 Apple Products 21 2005-10-03 18:30
Burning a DVD...can i add copy protection? thegelding Apple Products 18 2005-04-22 14:18


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 21:17.


Powered by vBulletin®
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2022, AppleNova