Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Category: CSS

HTML5 Table Borders Using CSS

14 November, 2012 | CSS, HTML5 | By: Michael Adams

I’m working on a HTML5 website and need a way to have borders on the TD tags without using the cellpadding and cellspacing attributes like I usually implement since they have been deprecated. After some googling I found a solution here. The answer does not mention HTML5 specifically but it worked like a charm. The above CSS will remove all spacing from a table completely and will do so for all tables on a page or any page that implement this CSS. The border-collapse: collapse attribute is added solely to collapse borders for for Internet Explorer versions 5-7. If you [Read More…]

Background Image Stretch With CSS

7 November, 2012 | CSS | By: Michael Adams

I was creating a UI from a PSD file and after I extracted the image background I realized that it was only 970px wide. So I went searching for a good way to stretch it out in the background and I ran across this gem. This HTML code combined with CSS will allow you to stretch an image of any size to fill in the entire space you need it to be the background for. In the example below this would go in the just inside of the body tag and would stretch over the entire background of the page. [Read More…]