All In One Script
MENU

Make body have 100% of the browser height

by 5:24:00 AM
undefined
Make body have 100% of the browser height I want to make body have 100% of the browser height. Can I do that using CSS? I tried setting height: 100%, but it doesn't work. I want to set a background color for a page to fill the entire browser window, but if the page has little content I get a ugly white bar at the bottom. Answer: Try setting the height of the html element to 100% as well. html, body { height: 100%; }

What characters can be used for up/down triangle (arrow without stem) for display in HTML?

by 5:19:00 AM
undefined
What characters can be used for up/down triangle (arrow without stem) for display in HTML? I'm looking for a HTML or ASCII character which is a triangle pointing up or down so that I can use it as a toggle switch. I found ↑ (↑), and ↓ (↓) - but those have a narrow stem. I'm looking just for the HTML arrow "head". Answer: Unicode arrows heads: ▲ - U+25B2 BLACK UP-POINTING TRIANGLE ▼ - U+25BC BLACK DOWN-POINTING TRIANGLE ▴ - U+25B4 SMALL BLACK UP-POINTING TRIANGLE ▾ -

Why don't self-closing script tags work?

by 5:17:00 AM
undefined
Why don't self-closing script tags work? What is the reason browsers do not correctly recognize: <script src="foobar.js" /> <!-- self-closing script tag --> Only this is recognized: <script src="foobar.js"></script> Does this break the concept of XHTML support? Note: This statement is correct at least for all IE (6-8 beta 2). Solution: XHTML 1 specification says: С.3. Element Minimization and Empty Element Content        Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph)

Make a div fill the height of the remaining screen space

by 5:15:00 AM
undefined
Make a div fill the height of the remaining screen space I am currently working on a web application, where I want the content to fill the height of the entire screen. The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom. I have a header div and a content div. At the moment I am using a table for the layout like

jQuery document.createElement equivalent?

by 5:12:00 AM
undefined
jQuery document.createElement equivalent? I'm refactoring some old JavaScript code and there's a lot of DOM manipulation going on. var d = document; var odv = d.createElement("div"); odv.style.display = "none"; this.OuterDiv = odv; var t = d.createElement("table"); t.cellSpacing = 0; t.className = "text"; odv.appendChild(t); I would like to know if there is a better way to do this using jQuery. I've been experimenting with: var odv = $.create("div"); $.append(odv); // And many more But I'm not sure if this is any better. Answer: here's your example

How do I reformat HTML code using Sublime Text 2?

by 5:10:00 AM
undefined
How do I reformat HTML code using Sublime Text 2? I've got some poorly-formatted HTML code that I'd like to reformat. Is there a command that will automatically reformat HTML code in Sublime Text 2 so it looks better and is easier to read? Answer: You don't need any plugins to do this. Just select all lines (CtrlA) and then from the menu select Edit → Line → Reindent. This will work if your file is saved with an extension that contains HTML

Instagram