How to Keep Your MySpace Page from Scrolling Horizontally

(I would have posted this only on my MySpace blog, but it seems MySpace doesn’t take kindly to Linux systems, even those running Firefox. If you’re here from there, my apologies for not making it easier on you. Trust me, I tried. I’ll be adding this to over there later.)

Don’t you just hate it when someone adds a pic or something on your coment’s section that makes your page so huge you have to scroll horizontally? I know I do. (Well, seeing it. I haven’t actually gotten images that big yet, but I see them all the time in people’s pages.)

To solve this, I deviced the following little bit of code. Just copy it (not including the demarcation lines) and paste it to the top or bottom of your “About Me” section. (Don’t worry, the code won’t be displayed on the page.)

<style type=”text/css”>
<!--code by Gnorb,>
embed {max-width:250px; display:block; margin-left: auto; margin-right:auto;}
img {max-width:250px; display:block; margin-left: auto; margin-right:auto;}

(You can go ahead and just do a copy/paste.) This resizes all images inserted using either the “embed” or “img” tags to 250 pixels in width. To make that larger or smaller, change the “250px” part of the code to whatever size you want (300px is pretty good). The images are also automatically centered. (I added that just because I think centered images look better.) If you don’t want your images centered, remove the following code from both: “display:block; margin-left: auto; margin-right:auto;”

I hope you find this useful. If you like it, drop me a line. If you don’t, feel free to ignore this message. Feel free to pass this info on to your firends, but if you could, tell ’em where you got the code from.

Share your thoughts