Top Questions - SnippetGoodmost recent 30 from http://snippetgood.com2010-03-12T00:49:28Zhttp://snippetgood.com/feedshttp://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://snippetgood.com/questions/151/how-do-i-make-two-column-layout-so-that-the-height-of-both-columns-is-100How do I make two-column layout so that the height of both columns is 100%?Antti Sykäri2009-11-12T03:28:54Z2010-03-04T11:22:28Z
<p>Assume that</p>
<ul>
<li>I want a two-column layout, say 200px wide navi and 400px wide content.</li>
<li>Either column can have an arbitrary amount of text (so I can't assume that the content is always taller than the navigation, for example).</li>
<li>I'd like both columns to have the same height, which is the maximum of the heights they would naturally have.</li>
</ul>
<p>There are <a href="http://www.pagecolumn.com/2%5Fcol%5Fgenerator.htm" rel="nofollow">lots of</a> <a href="http://www.456bereastreet.com/lab/developing%5Fwith%5Fweb%5Fstandards/csslayout/2-col/finished.html" rel="nofollow">2-column layout examples</a> on the web, but they either depend on the other column always being taller, or use tricks like <a href="http://css-tricks.com/examples/SuperSimpleTwoColumn/" rel="nofollow">colored background images</a> of fixed width.</p>
<p>Are tables or javascript the only options?</p>
http://snippetgood.com/questions/154/image-animationimage animationRemusRigo2009-11-24T10:47:42Z2010-03-03T13:26:41Z
<p>hi all
I have a site <a href="http://rigo.ro" rel="nofollow">rigo.ro</a> witch displays two images and moves them around. Under Iternet explorer it works great, but I want a code that works under Opera/Firefox</p>
<p>any help is welcomed
thanks</p>
http://snippetgood.com/questions/111/css-inline-embedded-external-or-external-parseCSS: inline, embedded, external or external parseGwyneth2009-10-19T16:21:35Z2010-03-03T07:23:00Z
<p>I was thinking about server load times and wondering what the most efficient way to add css is. What gets loaded fastest?</p>
<p>For my part, I think the external css is the easiest to maintain as a project scales, but sometimes you need a lot of these stylesheets for large scale websites with a lot of varying sections. What about parsing several css sheets on load?</p>
<p>as for snippets:</p>
<p>inline:</p>
<pre><code><div style="float: left;" class="left">hi</div>
</code></pre>
<p>embedded:</p>
<pre><code><head>
.left { float: left }
</head>
<body>
<div class="left">hi</div>
</body>
</code></pre>
<p>external:</p>
<pre><code> <head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="left">hi</div>
</body>
</code></pre>
<p>parsing:</p>
<pre><code> ????
</code></pre>
http://snippetgood.com/questions/66/current-year-copyright-line-in-aspCurrent Year Copyright Line in ASPbinky2009-10-11T01:50:35Z2010-02-28T10:23:07Z
<p>I was wondering what ways there are to have the current year in a copyright line. I don't like having to change it manually every year.</p>
http://snippetgood.com/questions/125/how-can-i-find-a-div-in-javascript-or-jqueryHow can I find a div in javascript or jqueryGreg2009-10-23T16:45:36Z2010-02-26T23:22:57Z
<p>How do I find on my page using javascript or jquery?</p>
http://snippetgood.com/questions/33/how-do-you-make-rounded-corners-in-all-browsersHow do you make rounded corners in all browsers? binky2009-10-03T03:05:13Z2010-02-20T06:31:57Z
<p>CSS? JQuery? What's the best and most efficient way to make rounded corners that work in all browsers?
I've tried a few and right now I'm making small divs that are positioned negatively outside of the relatively positioned parent divs. Instead of foreground images, I use sprites so the corner divs are less invasive. (ha ha I should give them shorter class names too)</p>
<p>since I'm asking for a snippet - I'll leave a snippet of what I do. </p>
<pre><code><div id="container">
<div class="corner-top-left"></div><div class="corner-top-right"></div>
<div class="corner-bottom-left"></div><div class="corner-bottom-right"></div>
</div>
#container
{
display: block;
height: 300px;
position: relative;
width: 500px;
}
.corner-top-left, .corner-top-right, .corner-bottom-left, .corner-bottom-right
{
background: url(corner.png) 0 0 no-repeat;
display: block;
height: 10px;
position: absolute;
width: 10px;
}
.corner-top-left { top: -10px; left: -10px;}
.corner-top-right { background-position: x x; top: -10px; right: -10px;}
.corner-bottom-left { background-position: x x; bottom: -10px; left: -10px;}
.corner-bottom-right { background-position: x x; bottom: -10px; right: -10px;}
</code></pre>
http://snippetgood.com/questions/79/what-doctype-is-best-for-standards-and-cross-browser-complianceWhat doctype is best for standards and cross browser compliance?Snipper2009-10-11T21:11:03Z2010-02-19T18:32:51Z
<p>Hello,
I know there are a few different doctypes out there, but which is a good one to use and benefits associated with it?</p>
<p>Thank you,
Ronson</p>
http://snippetgood.com/questions/159/apache-and-iis-compressionApache and IIS CompressionSnipper2010-02-01T01:58:06Z2010-02-01T01:58:06Z
<p>If you're wondering how you can do compression using apache and IIS 6 and 7 check out the this article</p>
<p><a href="http://www.danvogler.com/articles/apache-iis-compression.html" rel="nofollow">www.danvogler.com</a></p>
http://snippetgood.com/questions/158/what-is-the-shoemoney-systemWhat is The ShoeMoney System?Snipper2010-01-10T17:03:19Z2010-01-10T17:03:19Z
<p>The ShoeMoney System is one of our trusted sponsors. I've used the system personally, and many other techniques Jeremy Schoemaker has there's no doubt that this is the quickest way to advertise your site.</p>
<p><a href="http://www.shoemoneysystem.com/its-coming/?c=dvogler1" rel="nofollow">http://www.shoemoneysystem.com/its-coming/?c=dvogler1</a></p>
<p>Signup and you'll get four more videos. Watch them! It's a great intro to what internet marketing has to offer. If you think this offer is cheesy, it's not! </p>
http://snippetgood.com/questions/157/looking-for-a-little-bit-of-js-that-will-randomly-choose-contentlooking for a little bit of js that will randomly choose content.julian-mann2010-01-09T15:29:05Z2010-01-09T15:29:05Z
<p>I have a stackexchange site, vfxoverflow.com, and I would like yo place content in a box at random, or cycle through or whatever. For example, there are some tips or prompts such as: </p>
<ul>
<li>"Please vote up good questions"</li>
<li>"Don't post answers as comments, make a new answer"</li>
<li>"Don't post comments in the answer
field"</li>
</ul>
<p>I would like to put one in the question banner - a different one each refresh.</p>
<p>Thanks</p>
<p>Julian</p>
http://snippetgood.com/questions/63/current-year-copyright-line-in-jqueryCurrent Year Copyright Line in JQuerybinky2009-10-11T01:44:54Z2009-11-22T06:56:42Z
<p>I was wondering what ways there are to have the current year in a copyright line. I don't like having to change it manually every year.</p>
http://snippetgood.com/questions/149/tool-snippet-designer-for-visual-studioTool: Snippet Designer for Visual StudioStopTheSearch.com2009-11-11T21:30:49Z2009-11-11T21:30:49Z
<p>I just found a great tool on CodePlex - it simplifies all your snippet needs and can even take code you've highlighted in the IDE and covert it to a snippet auto-magically</p>
<p><a href="http://www.codeplex.com/SnippetDesigner" rel="nofollow">http://www.codeplex.com/SnippetDesigner</a></p>
http://snippetgood.com/questions/129/how-can-i-display-formatted-rss-data-in-a-divHow can I display formatted rss data in a DIVOPIEWeb2009-10-23T19:33:07Z2009-11-11T13:25:24Z
<p>I'd like to display the title and a snippet of the last 2 or 3 entries of an RSS feed on another site. </p>
<p>I do not have access to a server-side technology on the receiving page, only Javascript/JQuery. </p>
<p>What do I need in order to get that done? </p>
http://snippetgood.com/questions/89/if-statements-and-rangesIf statements and ranges miss snippet2009-10-13T17:23:45Z2009-11-11T04:45:33Z
<p>I have a JQuery script that I'm working on and in part of it, I am comparing a value to make sure it is within a specific integer range.</p>
<p>This is what my first attempt looks like:</p>
<pre><code>if (levelCounter < 0) { levelCounter = 0; }
if (levelCounter > maxLevels) { levelCounter = maxLevels;}
</code></pre>
<p>I'm hoping there's a shorter more efficient way to do this - I can't think of it off the top of my head.</p>
http://snippetgood.com/questions/120/b-or-strong<b> or <strong>?Snipper2009-10-23T03:15:54Z2009-11-11T04:39:16Z
<p>Let's talk html. Why am I told to use the <code><strong></code> tag instead of <code><b></code>? Was <code><b></code> too confusing?</p>
http://snippetgood.com/questions/143/using-font-tags-in-html-and-cssUsing font tags in html and css.Tillimook2009-10-31T16:05:30Z2009-11-11T04:29:03Z
<p>What's the best practice when using font tags in html?
Should I keep that in the css or use font tags in html?</p>
http://snippetgood.com/questions/100/community-server-siteurls-config-and-vanitycommunity server SiteUrls.config and vanityGreg2009-10-15T19:41:53Z2009-11-04T20:57:46Z
<p>How can I manipulate the vanity element in a url node? This is more of a general question, because I know I can get by with vanity={2}, but a lack of proper understanding is holding me back from truly mastering my community server site.</p>
<p>I've seen examples like this in the SiteUrls.config: </p>
<pre><code><url name="post_InPage_Old" path = "{0}/ShowThread.aspx#{1}" pattern = "(\d+)/ShowThread.aspx" vanity="{2}?PostID=$1^PermaPost=$2^UrlName=permalink" page="ForumUrlHandler.ashx" />
</code></pre>
<p>but the format confuses me. What are the $1 and $2? Where are they set?</p>
http://snippetgood.com/questions/107/asp-net-conditional-statementsASP.NET Conditional StatementsTillimook2009-10-17T15:52:33Z2009-10-31T16:29:04Z
<p>What kind of conditional statements does asp.net have, and how are they coded?</p>
<p>I'd like to see both VB and C#.</p>
<p>Here's a VB one I use:</p>
<pre><code>If condition Then
<statements>
Else If condition Then
<statements>
</code></pre>
<p>Thank you.</p>
http://snippetgood.com/questions/142/how-can-i-detect-which-browser-a-visitor-is-usingHow can I detect which browser a visitor is using?Snipper2009-10-31T15:45:38Z2009-10-31T15:45:38Z
<p>I want to show different content or give display a message to visitors using a specific browser.</p>
<p>Using javascript (or maybe jquery) or .NET can I detect the browser?</p>
http://snippetgood.com/questions/141/how-do-i-find-a-good-web-host-for-my-snippetsHow do I find a good web host for my snippets?Snipper2009-10-29T18:23:44Z2009-10-29T18:23:44Z
<p>Alright, I'm not asking for a snippet, but this is a <strong><em>very</em></strong> important question.</p>
<p><strong>How do I find and choose the right host for my website?</strong></p>
<p>I want a host that has reliable systems and good customer service.</p>
http://snippetgood.com/questions/140/a-calendar-for-your-websiteA calendar for your website?Snipper2009-10-29T17:54:27Z2009-10-29T17:54:27Z
<p>I've got some events I woud like to organize in a calendar, and I don't want to spend a lot of time with complicated systems. I found an calendar made in tables. </p>
<pre><code><TABLE BORDER=3 CELLSPACING=3 CELLPADDING=3>
<TR>
<TD COLSPAN="7" ALIGN=center><B>December 2001</B></TD>
</TR>
<TR>
<TD COLSPAN="7" ALIGN=center><I>Another year comes to an end</I></TD>
</TR>
<TR>
<TD ALIGN=center>Sun</TD>
<TD ALIGN=center>Mon</TD>
<TD ALIGN=center>Tue</TD>
<TD ALIGN=center>Wed</TD>
<TD ALIGN=center>Thu</TD>
<TD ALIGN=center>Fri</TD>
<TD ALIGN=center>Sat</TD>
</TR>
<TR>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center>1</TD>
</TR>
<TR>
<TD ALIGN=center>2</TD>
<TD ALIGN=center>3</TD>
<TD ALIGN=center>4</TD>
<TD ALIGN=center>5</TD>
<TD ALIGN=center>6</TD>
<TD ALIGN=center>7</TD>
<TD ALIGN=center>8</TD>
</TR>
<TR>
<TD ALIGN=center>9</TD>
<TD ALIGN=center>10</TD>
<TD ALIGN=center>11</TD>
<TD ALIGN=center>12</TD>
<TD ALIGN=center>13</TD>
<TD ALIGN=center>14</TD>
<TD ALIGN=center>15</TD>
</TR>
<TR>
<TD ALIGN=center>16</TD>
<TD ALIGN=center>17</TD>
<TD ALIGN=center>18</TD>
<TD ALIGN=center>19</TD>
<TD ALIGN=center>20</TD>
<TD ALIGN=center>21</TD>
<TD ALIGN=center>22</TD>
</TR>
<TR>
<TD ALIGN=center>23</TD>
<TD ALIGN=center>24</TD>
<TD ALIGN=center>25</TD>
<TD ALIGN=center>26</TD>
<TD ALIGN=center>27</TD>
<TD ALIGN=center>28</TD>
<TD ALIGN=center>29</TD>
</TR>
<TR>
<TD ALIGN=center>30</TD>
<TD ALIGN=center>31</TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
<TD ALIGN=center></TD>
</TR>
</TABLE>
</code></pre>
<p>I would much prefer an asp or php coded app. Is there anything I can use?</p>
http://snippetgood.com/questions/139/how-do-i-make-a-scaling-background-for-an-expandable-divHow do I make a scaling background for an expandable div?Gwyneth2009-10-29T17:53:53Z2009-10-29T17:53:53Z
<p>I have a div that I need to stretch a background for. It has a top and a bottom which shouldn't repeat, but the middle should. What's the best way to go about this? An image at the top and bottom and a div with a repeating background around them? </p>
http://snippetgood.com/questions/136/how-do-i-do-url-rewriting-with-mvcHow do I do URL rewriting with MVC?miss snippet2009-10-28T16:24:08Z2009-10-29T17:44:20Z
<p>How do I do URL rewriting with MVC? Where do I put the code? Is it in Global.asax?</p>
<p>Updated question: Can someone give me a snippet for defining routes in MVC?</p>
http://snippetgood.com/questions/50/how-can-i-make-a-basic-jquery-rotatorHow can I make a basic jquery rotator?Greg2009-10-08T22:57:42Z2009-10-29T17:41:24Z
<p>Are there any jquery rotators out there that are both basic and flexible? I've tried a bunch of carousel ones and they are not what I want.</p>
<p>It should have pager ability and transitions if possible. Also I need to be able to put text on the images, but if that's not possible I could save the text into the images.</p>
http://snippetgood.com/questions/37/how-do-i-reset-the-css-of-a-websiteHow do I reset the CSS of a website?Tillimook2009-10-04T03:37:45Z2009-10-27T23:49:37Z
<p>How can I reset the CSS of a website?</p>
http://snippetgood.com/questions/29/what-are-the-best-internet-explorer-hacks-in-cssWhat are the best Internet Explorer hacks in CSSGreg2009-10-02T15:25:49Z2009-10-26T22:09:15Z
<p>Let's get to the bottom of this. Hacks are a neccessary evil sometimes, but they make my css look ugly and add bulk to my file.</p>
<p>What is the best way to make things look right in all versions of internet explorer?</p>
<p>I've seen a lot of this:</p>
<pre><code>html>body .class
</code></pre>
<p>some of this</p>
<pre><code>voice-family: "\"}\"";
voice-family:inherit;
</code></pre>
<p>And even this</p>
<pre><code>height: 60px!important;
height: 60px;
</code></pre>
http://snippetgood.com/questions/126/add-a-class-to-something-based-on-its-content-in-jqueryadd a class to something based on its content in jquery?Gwyneth2009-10-23T16:49:08Z2009-10-23T16:58:38Z
<p>I have a bunch of divs that have the same class on them. They are created dynamically, so I can't assign any further classes to differentiate them. Is there anything I can do to make one have red text for example if it's a certain tag like "photoshop"?</p>
http://snippetgood.com/questions/122/jquery-how-can-i-use-show-hide-and-opacityJQuery how can I use show/hide and opacity?miss snippet2009-10-23T03:51:19Z2009-10-23T03:51:19Z
<p>This goes for all effects except for slideUp/slideDown. </p>
<p>If I set opacity for an id/class that I'm manipulating with show/hide or fadeIn/fadeOut, my opacity is set to 1 (100%) instead of whatever I've set it as in the css. Is there any way to override that behaviour? </p>
http://snippetgood.com/questions/119/wrap-text-around-image-with-html-and-cssWrap text around image with html and css.Snipper2009-10-23T03:11:01Z2009-10-23T03:16:29Z
<p>How can I wrap text around an image? </p>
<p>The image can be in the top left or right. </p>
<p>I'm thinking of using a graphical image for a drop case letter, or a profile picture with text wrapping around it.</p>
http://snippetgood.com/questions/42/use-jquery-hosted-by-google-or-hosted-by-microsoftUse jQuery hosted by Google or hosted by Microsoft?StopTheSearch.com2009-10-05T04:50:02Z2009-10-21T03:31:11Z
<p>They both offer jQuery hosting now - which should I use? I'm leaning towards the Microsoft option since they also host the jquery-1.3.2-vsdoc.js file which means I get full Intellisense support in Visual Studio.</p>
<p>Thoughts?</p>