|
Papaver
Madmin Emeritus?

Registered: 06/01/02
Posts: 26,880
Loc: Radio Free Tibet!
|
MSIE CSS 2.0 Compliance Issues: Variance Torn For Kaputtzville...
#5758133 - 06/16/06 05:20 PM (17 years, 7 months ago) |
|
|
Formerly Titled: "MySpace Tom & Bill Gates Both Suck Donkey Cock!"
Ok, so we all know that MySpace pages can look incredibly shitty. I mean they even put shitty to shame.
There are several reasons for this. The chief of which is that MySpace give little if no facilitation for user modifications. It would have been real easy for them to let you specify a new style sheet, but they don't. You have to load your style sheet in your content as the page is loading, which makes for a nice little bit of visual chaos upon load.
The next problem is that the MySpace style sheet you are trying to hack is a fucking un-elegant counter intuitive mess. Many of the very table objects aren't even given a name or an id.
The problem I was tackling today is the problem of people who put 800 pixel wide images in your comments and make your whole page scroll horizontally forever. The easy fix, of course, is to simply edit/delete the comment, which would be fine if the intent was malicious, but most often it's not, and you want to preserve the comment and the image. And you don't want to spend your whole life photoshopping comment images to be smaller...
The answer would at first appear to be to use the CSS 2.0 "max-width" attribute, like so:
Code:
td.text td.text table table td img {width:400px; max-width:400px; width:auto; height:auto;}
This would be fine except for the fact that MSIE is not CSS 2.0 compliant and hasn't implemented "max-width".
Fine you say, then simply add some javascript using the expression() function the class, like so:
Code:
width: expression(this.width > 400 ? "400px": "auto");
Only problem is that MSIE 5 doesn't recognize this either, and if you are using MSIE on a Mac, that is as current as you can get.
So I then devised a nifty little javascript loop to cycle through the offending images and re-scale them:
Code:
<script language="javascript"> var detect = navigator.userAgent.toLowerCase(); if(place = detect.indexOf('msie') + 1) { for(i=0 ; i < document.images.length ; i++) { if(document.images[i].width > 400) { document.images[i].width = 400; document.images[i].height = (400 / document.images[i].width) * document.images[i].height; alert("resize operation"); } } } </script>
Thinking that the use of all the above would finally solve my problems, I happily uploaded all my modifications to my "About Me" text, and what did I discover?
I discovered that MySpace edits out your fucking <script> tags, so that your javascript shows up as text on your page, and doesn't mutherfucking execute!!!
So although, I think I have the problem solved for most browsers, I still can't solve it for the one that I most often view my page with, MSIE 5 on Mac OS X...
PS: Tom or Bill, if you're reading this right now. Just kidding, guys. Please don't smite me down like some kind of wrathful old testament god... 
PPS: If any of you Shroomery Code Wizards can help me with this one please let me know!
--------------------
Edited by Papaver (06/16/06 08:33 PM)
|
Papaver
Madmin Emeritus?

Registered: 06/01/02
Posts: 26,880
Loc: Radio Free Tibet!
|
Re: MySpace Tom & Bill Gates Both Suck Donkey Cock! [Re: Papaver]
#5758247 - 06/16/06 05:54 PM (17 years, 7 months ago) |
|
|
Ok, so I was just reading about "Sammy The Hero," so I can see why MySpace needs to have vigilant javascript denial...
So in true Steven Colbert style,
Tom, I'm taking you off my list, but make sure you behave. And Bill, you're still on my list. You and Bears! You need to make your shit more compliant with the official spec; stop trying to be such a loner...
--------------------
|
HagbardCeline
Student-Teacher-Student-Teacher


Registered: 05/10/03
Posts: 10,026
Loc: Overjoyed, at the bottom ...
Last seen: 19 days, 4 hours
|
Re: MySpace Tom & Bill Gates Both Suck Donkey Cock! [Re: Papaver]
#5758609 - 06/16/06 08:21 PM (17 years, 7 months ago) |
|
|
I remember you.
PS - MySpace = teh gay. I sure wish I had a page.
-------------------- I keep it real because I think it is important that a highly esteemed individual such as myself keep it real lest they experience the dreaded spontaneous non-existance of no longer keeping it real. - Hagbard Celine
|
Papaver
Madmin Emeritus?

Registered: 06/01/02
Posts: 26,880
Loc: Radio Free Tibet!
|
Re: MySpace Tom & Bill Gates Both Suck Donkey Cock! [Re: HagbardCeline]
#5758636 - 06/16/06 08:30 PM (17 years, 7 months ago) |
|
|
I remember you too...
Actually, it's pretty cool. I've met some cool artists on it. When you're endeavoring to paint for a living, it's best to be seen; as opposed to dying in obscurity, although that does have a nice romanticist aspect to it. In fact, it reminds me of this one time when I had to go to the store to get some magic beans for my mother. I was walking to the store -- I had an onion on my belt because that was the style at the time (we couldn't afford white onions because of the war, so mom got me a yellow onion), but that was back in '42 when the Kaiser was dropping japs on Kansas City; that's why all the jazz guys went to New York City... . .. ..o. ... .o...o.. . ...o. .. .
--------------------
|
HagbardCeline
Student-Teacher-Student-Teacher


Registered: 05/10/03
Posts: 10,026
Loc: Overjoyed, at the bottom ...
Last seen: 19 days, 4 hours
|
Re: MySpace Tom & Bill Gates Both Suck Donkey Cock! [Re: Papaver]
#5758673 - 06/16/06 08:42 PM (17 years, 7 months ago) |
|
|

Please don't tell me you were one those people who would wear a yellow onion with brown pants. If you must wear a yellow instead of a white onion, fine. Just don't wear brown fucking pants!
I'm just joshin' ya about the MySpace BTW. I'm just not on it because I feel too old. I'd be like some faggy douche who was trying to act younger than they were.
Or maybe I just can't figure out the intarweb.
-------------------- I keep it real because I think it is important that a highly esteemed individual such as myself keep it real lest they experience the dreaded spontaneous non-existance of no longer keeping it real. - Hagbard Celine
|
Papaver
Madmin Emeritus?

Registered: 06/01/02
Posts: 26,880
Loc: Radio Free Tibet!
|
Re: MySpace Tom & Bill Gates Both Suck Donkey Cock! [Re: HagbardCeline]
#5758766 - 06/16/06 09:10 PM (17 years, 7 months ago) |
|
|
Yeah, except no white onions after Labor Day... 
I'm 41 and I don't feel too old on there. In fact, there's a number of people on there whose ages range from 35-55; There are far more teenie-boppers than old farts like me, but there are also far more bands and cam-girls promoting themselves than artists promoting themselves, so I do feel outnumbered in a sense, but that's not going to deter me...
It's sort of like life; it's a huge space, and you just have to sort of carve out your little niche in it. I think it's actually going grow into a pretty good resource, in the future, for artists to network and get their work seen, and I wanted to get into it sooner rather than later...
I wish some of the shroomery techno-leet would come into this thread and help me with my CSS/MSIE/Max-Width problem...
--------------------
|
HagbardCeline
Student-Teacher-Student-Teacher


Registered: 05/10/03
Posts: 10,026
Loc: Overjoyed, at the bottom ...
Last seen: 19 days, 4 hours
|
Re: MySpace Tom & Bill Gates Both Suck Donkey Cock! [Re: Papaver]
#5758803 - 06/16/06 09:23 PM (17 years, 7 months ago) |
|
|
It's Friday night. They're probably at LAN parties or sex dungeons.
-------------------- I keep it real because I think it is important that a highly esteemed individual such as myself keep it real lest they experience the dreaded spontaneous non-existance of no longer keeping it real. - Hagbard Celine
|
Ythan
ᕕ( ᐛ )ᕗ


Registered: 08/08/97
Posts: 18,774
Loc: NY/MA/VT Borderlands
Last seen: 6 hours, 47 minutes
|
Re: MSIE CSS 2.0 Compliance Issues: Variance Torn For Kaputtzville... [Re: Papaver]
#5759562 - 06/17/06 01:21 AM (17 years, 7 months ago) |
|
|
I'd be glad to help but it sounds like you've already gotten as far as I would have. Having no Mac to test on means I can only come up with theoretical solutions. Why not just switch to Firefox or Safari? That's what most Macheads use and both should work with your CSS. Welcome to the wonderful world of cross-browser compatible coding... Now you know why webmasters are always so crankey
|
Papaver
Madmin Emeritus?

Registered: 06/01/02
Posts: 26,880
Loc: Radio Free Tibet!
|
Re: MSIE CSS 2.0 Compliance Issues: Variance Torn For Kaputtzville... [Re: Ythan]
#5759596 - 06/17/06 01:43 AM (17 years, 7 months ago) |
|
|
Yeah, I think I've gone about as far as I can go. I've run up against the Microsoft wall, and that's a pretty big one. You forget, I used to do this for a living way back when. I can remember when Microsoft tried to hijack javascript...
I think it's looking pretty decent for now. Thanks for your help earlier in suggesting the DOM hack. It would have worked if not for Tom and his minions.
--------------------
|
|