Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> I Need Help With A Code: Myspace Profile Css
gamerchick39
post Nov 8 2005, 02:58 AM
Post #1


Advanced Member
Group Icon

Group: Members
Posts: 152
Joined: 25-May 05
Member No.: 5,434



Ok, I made this background for myspace, but it wants to tile itself and all that jazz.. the image is 800x600 cuz i know most users have that setting. anyhoo im sure there is a html tag out there somewhere to keep an image fixed and resized depending on resolution.. but then again i could be wrong haha.. come to think of it i probably am wrong but i thought i would ask you all if you knew of a code that would do that...

here is my profile page for reference: Myspace Page

anyhelp is greatly appreciated.. i may just wind up fading the edges of the pic into black and centering that, but i dunno. I will wait and see what you all say smile.gif

This post has been edited by microscopic^earthling: Nov 8 2005, 03:29 PM
Go to the top of the page
 
+Quote Post
Retaining
post Nov 9 2005, 04:16 AM
Post #2


Member - Active Contributor
Group Icon

Group: Members
Posts: 78
Joined: 1-September 05
Member No.: 8,258



If you are using CSS to format your MySpace (if you are, please tell me how you did it!), you can set the "background-repeat" attribute of whatever you are applying a background image to (body, most likely) to "no-repeat" to prevent tiling (or "repeat-x" or "repeat-y" to make it tile in one direction). You can also set the "background-position" atribute to "top", "bottom", "left", "right", or "center", or a combination of those (such as "bottom right") to make the background stay in one corner.
Go to the top of the page
 
+Quote Post
gamerchick39
post Nov 11 2005, 04:26 AM
Post #3


Advanced Member
Group Icon

Group: Members
Posts: 152
Joined: 25-May 05
Member No.: 5,434



i just use the profile editors that you just punch in what you want and it spits out code for ya.. the only reason i do any extra coding on my own is for things like background music or tweaking the background like i am doing now...

i changed around my picture so it just blends into the black and i think it looks pretty good.. but i already knew about the codes you talked about Retaining, the thing i wanted to do was make it so the background image would resize itself to the viewers resolution.. but the more i think about it, i dont think its possible..
Go to the top of the page
 
+Quote Post
abhiram
post Nov 11 2005, 11:53 AM
Post #4


Hedonist at large
Group Icon

Group: Members
Posts: 610
Joined: 30-July 05
From: another realm
Member No.: 7,524



Whoa ... spent some time with google trying to find out how to get it to work. No luck yet.

I'll keep looking and if I get anything I'll post back.
Go to the top of the page
 
+Quote Post
Houdini
post Nov 11 2005, 01:54 PM
Post #5


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



You would have to use a script to resize, with PHP you would have to have the GD libraries installed and enabled on the server, they may or may not, they might not even support php, if that is the case then you would have to use a JavaScript, try foing a search for javascript, but I am not sure if that would be able to handle it, becase JavaScript is client side and not server side, plust you woul have to sniff out the browsers resolution which JavaScript can do, but then you are talking about adding alot of code and also if the user has Java disabled then it wouldn't work anyway, bot sure without PHP it could be done.
Go to the top of the page
 
+Quote Post
Houdini
post Nov 11 2005, 02:04 PM
Post #6


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



Here's a JavaScript you might can modify and make work.
CODE
IE4/5 and NN6 simply allow to script
 document.imageName.width = newWidth;
 document.imageName.height = newHeight;
while with NN4 the image dimensions are readonly. You can however put a
layer over the image to which you write the image with the new
dimensions. The following code provides that falling back for IE4/5 and
NN6 on the above assigment. Note that with NN4 the layer put over the
image might cover other content as well when you increase the image
size as there is no reflow of the document content around the image.

<HTML>
<HEAD>
<STYLE>
</STYLE>
<script>
function resizeImage (imageOrImageName, width, height) {
 var image = typeof imageOrImageName == 'string' ?
               document[imageOrImageName] : imageOrImageName;
 if (document.layers) {
   image.currentWidth = width;
   image.currentHeight = height;
   var layerWidth = image.width > width ? image.width : width;
   var layerHeight = image.height > height ? image.height : height;
   if (!image.overLayer) {
     var l = image.overLayer = new Layer(layerWidth);
   }
   var l = image.overLayer;
   l.bgColor = document.bgColor;
   l.clip.width = layerWidth;
   l.clip.height = layerHeight;
   l.left = image.x;
   l.top = image.y;
   var html = '';
   html += '<IMG SRC="' + image.src + '"';
   html += image.name ? ' NAME="overLayer' + image.name + '"' : '';
   html += ' WIDTH="' + width + '" HEIGHT="' + height + '">';
   l.document.open();
   l.document.write(html);
   l.document.close();
   l.visibility = 'show';
 }
 else {
   image.width = width;
   image.height = height;
 }
}
function zoomImage (imageOrImageName, factor) {
 var image = typeof imageOrImageName == 'string' ?
               document[imageOrImageName] : imageOrImageName;
 if (document.layers) {
   var currentWidth = image.currentWidth ? image.currentWidth :
image.width;
   var currentHeight = image.currentHeight ? image.currentHeight :

Just do a search or JavaScript image resize and you might find exactly what you want, but I don't know anything about MySpace and what you are able to do with it, you might not be allowed to use script or PHP at all if not then I can't help any more than that. Sorry if this is the case.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic css code(2)
  2. Code To Send An Email From A Form(10)
  3. Simple Java Script Code For Print Pages(0)
  4. Myspace Design(16)
  5. Jscript/html/css Code Help(8)
  6. Free Shoutbox? HTML, Flash or PHP Code(24)
  7. To Hide Your Source Code(13)
  8. Blogger Code Problems(1)
  9. Home Videos(4)
  10. Free Code Snippets And Css Layout(14)
  11. Code Improvement And Optimization(2)
  12. Change The Look Of Your Myspace Page(1)
  13. The Step Up. A Guide For Myspace Design(2)
  14. Are Webspaces Old News, Is Myspace...& Others The New Deal(5)


 



- Lo-Fi Version Time is now: 5th December 2008 - 01:14 AM