<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/width</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 19 Jun 2013 09:19:28 GMT</pubDate>
<item>
<title>(PHP) PHP Image Ratio Width &amp;amp; Height, Top &amp;amp; Left - ShawnG</title>
<link>http://snipplr.com/view/71321/php-image-ratio-width--height-top--left/</link>
<description><![CDATA[ <p>Returns array with information like:
Input image
width 200
height 200

     print_r(ratioResize('path/to/image.ext' ,  100 , 50));



output:


     array(
         [ratio] => .5,
         [height] => 50,
         [width] => 50,
         [left] => 25,
         [top] => 25
     );</p> ]]></description>
<pubDate>Wed, 29 May 2013 03:48:55 GMT</pubDate>
<guid>http://snipplr.com/view/71321/php-image-ratio-width--height-top--left/</guid>
</item>
<item>
<title>(CSS) iframe css for dynamic width - leodruker</title>
<link>http://snipplr.com/view/70463/iframe-css-for-dynamic-width/</link>
<description><![CDATA[ <p>CSS to define an iframe to always be 100% of the container it's in.</p> ]]></description>
<pubDate>Tue, 19 Mar 2013 04:46:17 GMT</pubDate>
<guid>http://snipplr.com/view/70463/iframe-css-for-dynamic-width/</guid>
</item>
<item>
<title>(CSS) Fluid width spacing of divs - rickygri</title>
<link>http://snipplr.com/view/67868/fluid-width-spacing-of-divs/</link>
<description><![CDATA[ <p>Space div elements evenly inside a wrapper without using float (no right spacing issue) so that all elements are flush to the edges.</p> ]]></description>
<pubDate>Mon, 22 Oct 2012 22:33:26 GMT</pubDate>
<guid>http://snipplr.com/view/67868/fluid-width-spacing-of-divs/</guid>
</item>
<item>
<title>(CSS) CSS Box Sizing - Japegrape</title>
<link>http://snipplr.com/view/67803/css-box-sizing/</link>
<description><![CDATA[ <p>This code modifies the default Box Sizing model from its regular style, "Content Box," to the much more sensible "Border Box," which does not include padding on top of width/height values.</p> ]]></description>
<pubDate>Fri, 19 Oct 2012 05:44:53 GMT</pubDate>
<guid>http://snipplr.com/view/67803/css-box-sizing/</guid>
</item>
<item>
<title>(PHP) Get the width, height, type and attr of an image - Some0ne</title>
<link>http://snipplr.com/view/67577/get-the-width-height-type-and-attr-of-an-image/</link>
<description><![CDATA[ <p>Just a rework of http://snipplr.com/view/7523/  with an added switch to change type number to extention name.</p> ]]></description>
<pubDate>Wed, 03 Oct 2012 12:53:29 GMT</pubDate>
<guid>http://snipplr.com/view/67577/get-the-width-height-type-and-attr-of-an-image/</guid>
</item>
<item>
<title>(CSS) Centering div without width - cesarkohl</title>
<link>http://snipplr.com/view/65953/centering-div-without-width/</link>
<description><![CDATA[ <p>The idea here is that you contain the content you want to center in two divs, an outer one and an inner one. You float both divs so that their widths automatically shrink to fit your content. Next, you relatively position the outer div with it's right edge in the center of the container. Lastly, you relatively position the inner div the opposite direction by half of its own width (actually the outer div's width, but they are the same). Ultimately that centers the content in whatever container it's in.

Check out the pictures on the website and it'll be clear.

You may need that empty div at the end if you depend on your "product" content to size the height for the "product_container".</p> ]]></description>
<pubDate>Thu, 05 Jul 2012 03:06:59 GMT</pubDate>
<guid>http://snipplr.com/view/65953/centering-div-without-width/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 - trim text for specific width and heigh - burnandbass</title>
<link>http://snipplr.com/view/62792/as3--trim-text-for-specific-width-and-heigh/</link>
<description><![CDATA[ <p>Hi;

Sometimes you need to "trim" textifield for specific height... This solves just this, perfect for news, news-readers, rss etc</p> ]]></description>
<pubDate>Thu, 26 Jan 2012 22:13:05 GMT</pubDate>
<guid>http://snipplr.com/view/62792/as3--trim-text-for-specific-width-and-heigh/</guid>
</item>
<item>
<title>(PHP) Resize an image without distorting proportions (JPEG, GIF or PNG) - TimoZachi</title>
<link>http://snipplr.com/view/58584/resize-an-image-without-distorting-proportions-jpeg-gif-or-png/</link>
<description><![CDATA[ <p>A function that resizes an image to desired width and height, but does not distort the image proportions. Works for JPEG, GIF and PNG.</p> ]]></description>
<pubDate>Sat, 10 Sep 2011 08:38:41 GMT</pubDate>
<guid>http://snipplr.com/view/58584/resize-an-image-without-distorting-proportions-jpeg-gif-or-png/</guid>
</item>
<item>
<title>(PHP) Get All information from youtube video - TimoZachi</title>
<link>http://snipplr.com/view/58573/get-all-information-from-youtube-video/</link>
<description><![CDATA[ <p>This code snippet gets all information from a YouTube video (title, description, duration, thumbnail url, thumbnail width, thumbnail height, etc..) using the video id and YouTube API.</p> ]]></description>
<pubDate>Sat, 10 Sep 2011 03:51:42 GMT</pubDate>
<guid>http://snipplr.com/view/58573/get-all-information-from-youtube-video/</guid>
</item>
<item>
<title>(JavaScript) Browser dependent viewport size - devnull69</title>
<link>http://snipplr.com/view/56187/browser-dependent-viewport-size/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 06 Jul 2011 23:50:35 GMT</pubDate>
<guid>http://snipplr.com/view/56187/browser-dependent-viewport-size/</guid>
</item>
<item>
<title>(jQuery) prettyPhoto YouTube width and height - devnull69</title>
<link>http://snipplr.com/view/56012/prettyphoto-youtube-width-and-height/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 01 Jul 2011 23:12:50 GMT</pubDate>
<guid>http://snipplr.com/view/56012/prettyphoto-youtube-width-and-height/</guid>
</item>
<item>
<title>(PHP) Flickr Recent Photos to HTML with PHP - jakekimpton</title>
<link>http://snipplr.com/view/55467/flickr-recent-photos-to-html-with-php/</link>
<description><![CDATA[ <p>It’s been driving me crazy that there’s no definitive script written to take out a user’s Flickr recent photos and parse it for formatting into HTML with a larger size than the standard 75 x 75 dimensions that the public_photo.gne Flickr script outputs. So I’ve written one, using a bit of skill and a snippet of code that someone posted which was kind of going in the same direction but then suddenly stopped and took a hard u-turn, veering off to somewhere stupid, as usual with programmers who know too much. So here’s a quick run through of what the code does:

Collect the User ID that is added manually and constructs the Feed Links
Get the File contents of the Feed Link once it’s been run
Convert the XML to HTML
Return it to the script for printing or a variable (Choice of the Programmer)

I haven’t tested this on different versions of PHP, all I know is it works for me, and it’s using some pretty simple stuff so it should work fine. Just change the ID to your own or whoever’s it has to be and it should run.</p> ]]></description>
<pubDate>Sat, 18 Jun 2011 20:21:14 GMT</pubDate>
<guid>http://snipplr.com/view/55467/flickr-recent-photos-to-html-with-php/</guid>
</item>
<item>
<title>(CSS) Vertically centre a menu without setting an explicit width - 1man</title>
<link>http://snipplr.com/view/48293/vertically-centre-a-menu-without-setting-an-explicit-width/</link>
<description><![CDATA[ <p>Useful bit of CSS to vertically centre a navigation. Good for Pagination.</p> ]]></description>
<pubDate>Thu, 03 Feb 2011 01:16:25 GMT</pubDate>
<guid>http://snipplr.com/view/48293/vertically-centre-a-menu-without-setting-an-explicit-width/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Fill Available Screen Area with Squares (Centred) - adrianparr</title>
<link>http://snipplr.com/view/46497/as3-fill-available-screen-area-with-squares-centred/</link>
<description><![CDATA[ <p>Taken from Christian Cantrell's Adobe article called 'Authoring mobile Flash content for multiple screen sizes'.</p> ]]></description>
<pubDate>Wed, 05 Jan 2011 01:18:42 GMT</pubDate>
<guid>http://snipplr.com/view/46497/as3-fill-available-screen-area-with-squares-centred/</guid>
</item>
<item>
<title>(CSS) Prevent oversized content to break fixed width floated layouts - blueocto</title>
<link>http://snipplr.com/view/46366/prevent-oversized-content-to-break-fixed-width-floated-layouts/</link>
<description><![CDATA[ <p>When oversized content (i.e. wide image) is placed in fixed width floated container, it may break the layout. To prevent that use this trick. It will hide a part of the content but at least your layout structure will remain intact.</p> ]]></description>
<pubDate>Sat, 01 Jan 2011 03:16:26 GMT</pubDate>
<guid>http://snipplr.com/view/46366/prevent-oversized-content-to-break-fixed-width-floated-layouts/</guid>
</item>
<item>
<title>(CSS) Centralizar menu sem largura ( width without center menu  ) - shadow_d2</title>
<link>http://snipplr.com/view/43493/centralizar-menu-sem-largura--width-without-center-menu--/</link>
<description><![CDATA[ <p>Centralizar menu sem usar width</p> ]]></description>
<pubDate>Wed, 03 Nov 2010 23:05:06 GMT</pubDate>
<guid>http://snipplr.com/view/43493/centralizar-menu-sem-largura--width-without-center-menu--/</guid>
</item>
<item>
<title>(CSS) Center a div inside of a div - alozuldo</title>
<link>http://snipplr.com/view/42864/center-a-div-inside-of-a-div/</link>
<description><![CDATA[ <p>Of course, you don't have to set the width to 50%. Any width less than the containing div will work. The margin: auto is what does the actual centering.</p> ]]></description>
<pubDate>Mon, 25 Oct 2010 09:22:20 GMT</pubDate>
<guid>http://snipplr.com/view/42864/center-a-div-inside-of-a-div/</guid>
</item>
<item>
<title>(CSS) CSS: Printer Friendly Header Visibility Styles - karlhorky</title>
<link>http://snipplr.com/view/36887/css-printer-friendly-header-visibility-styles/</link>
<description><![CDATA[ <p>When developing a website, an important consideration is accessibility on other media, including the medium of print. However, the printing engines of most browsers render content differently to allow for simple printed pages. One of the most notable differences is the omission of background images by default in modern browsers' print output. Background images are commonly used for header elements, which causes missing branding in the resulting printed pages.
 
One option defined in this snippet is to add markup after your normal header for a 0 pixel by 0 pixel `` element (your print version header), and then style the two headers as invisible and visible based upon the stylesheet medium. So when you're viewing the screen version of the page the normal header will be visible and the print header will be an invisible element with a width and height of 0 pixels. With the print version of the page the normal header will not be displayed at all and the print header will be a visible element that is floated and correctly sized.

This solution has been tested to work in:

*  Microsoft Internet Explorer 6, 7, 8
*  Mozilla Firefox 3.6
*  Google Chrome 5
*  Apple Safari 4
*  Opera 10</p> ]]></description>
<pubDate>Thu, 08 Jul 2010 04:43:28 GMT</pubDate>
<guid>http://snipplr.com/view/36887/css-printer-friendly-header-visibility-styles/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 SWF Metadata - adrianparr</title>
<link>http://snipplr.com/view/32570/as3-swf-metadata/</link>
<description><![CDATA[ <p>Make sure you put the SWF Metadata AFTER any import statements.</p> ]]></description>
<pubDate>Wed, 21 Apr 2010 10:10:41 GMT</pubDate>
<guid>http://snipplr.com/view/32570/as3-swf-metadata/</guid>
</item>
<item>
<title>(JavaScript) Get Window Height and Width (Cross-Compatible) - djstaz0ne</title>
<link>http://snipplr.com/view/30799/get-window-height-and-width-crosscompatible/</link>
<description><![CDATA[ <p>Returns window size as object.
winsize.x = window width;
winsize.y = window height;</p> ]]></description>
<pubDate>Fri, 02 Apr 2010 08:47:00 GMT</pubDate>
<guid>http://snipplr.com/view/30799/get-window-height-and-width-crosscompatible/</guid>
</item>
</channel>
</rss>