How do I create an HTML button that acts like a link?

HTML The plain HTML way is to put it in a <form> wherein you specify the desired target URL in the action attribute. <form action=”https://google.com”> <input type=”submit” value=”Go to Google” /> </form> If necessary, set CSS display: inline; on the form to keep it in the flow with the surrounding text. Instead of <input type=”submit”> … Read more

Make a div fill the height of the remaining screen space

2015 update: the flexbox approach There are two other answers briefly mentioning flexbox; however, that was more than two years ago, and they don’t provide any examples. The specification for flexbox has definitely settled now. Note: Though CSS Flexible Boxes Layout specification is at the Candidate Recommendation stage, not all browsers have implemented it. WebKit … Read more

How to make a div 100% height of the browser window

There are a couple of CSS 3 measurement units called: Viewport-Percentage (or Viewport-Relative) Lengths What are Viewport-Percentage Lengths? From the linked W3 Candidate Recommendation above: The viewport-percentage lengths are relative to the size of the initial containing block. When the height or width of the initial containing block is changed, they are scaled accordingly. These … Read more

I need an unordered list without any bullets

You can remove bullets by setting the list-style-type to none on the CSS for the parent element (typically a <ul>), for example: ul { list-style-type: none; } You might also want to add padding: 0 and margin: 0 to that if you want to remove indentation as well. See Listutorial for a great walkthrough of … Read more

How do I disable the resizable property of a textarea?

The following CSS rule disables resizing behavior for textarea elements: textarea { resize: none; } To disable it for some (but not all) textareas, there are a couple of options. You can use class attribute in your tag(<textarea class=”textarea1″>): .textarea1 { resize: none; } To disable a specific textarea with the name attribute set to … Read more

How do you disable browser autocomplete on web form field / input tags?

Firefox 30 ignores autocomplete=”off” for passwords, opting to prompt the user instead whether the password should be stored on the client. Note the following commentary from May 5, 2014: The password manager always prompts if it wants to save a password. Passwords are not saved without permission from the user. We are the third browser … Read more

Set cellpadding and cellspacing in CSS?

Basics For controlling “cellpadding” in CSS, you can simply use padding on table cells. E.g. for 10px of “cellpadding”: td { padding: 10px; } For “cellspacing”, you can apply the border-spacing CSS property to your table. E.g. for 10px of “cellspacing”: table { border-spacing: 10px; border-collapse: separate; } This property will even allow separate horizontal … Read more