All right, here's my situation I have a bunch of articles stored in my database, plain jane HTML ones submitted by a few hundred different people (read: people of all varying levels of HTML expertise, from none to expert)
In some of these HTML snippets are <div>'s and <tables> and other items that one way or another have a width specified (via CSS, inline style, or width parameters) What i need to do is take these snippets of HTML and somehow restrict the width of these items to the size of the 'viewport' of the page (i am making an iPhone friendly version of the site) Now if the width's were defined in a consistent manner, then i would just search and replace on the server when i pull the HTML from the database, but there's so many different variations that doing this isn't realistic is there some way that jQuery could be of help here? i've already taken a run at this using "LiveQuery" and saying: jQuery(document).ready(function() { jQuery("div").livequery(function() { console.log('Div: ', jQuery(this).width()); }); }); just to see if i could at least "see" all div's that need action taken against them, but all i get from that is "NaN".... even if i could get the div's i need, i am not sure what i could do to skinny them up anyways So i am open for suggestions... oh, to see an example of this: http://iphone.team-integra.net (no worries pulling it up in Firefox or whatever), then click "Articles", then "Newest 8", and the first one will show what i mean... the article text is wrapped in <div style="width: 600px;"></div> and that's inside a Viewport that's only 320 px wide Again, changing the text in the article isn't an option, there's simply way too many ways over these 7+ years of articles that width has been set Thanks in advance