Jump to content
xisto Community
Sign in to follow this  
gamerchick39

I Need Help With A Code: Myspace Profile Css

Recommended Posts

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 ;)

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Here's a JavaScript you might can modify and make work.

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.