-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCSS Tricks
More file actions
15 lines (11 loc) · 893 Bytes
/
CSS Tricks
File metadata and controls
15 lines (11 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CSS Tricks
To make the entire box-area around a link clickable, like in a navigation menu, instead of just the text being clickable:
Make the <a> display: block, and don't put padding in the <li> selector, instead put padding in the <a>
so that it will take up the whole <li> area.
To change the font-size of a Submit button apparently you have to change the background-color of it too, otherwise the
font size won't change! Bizarre!
In order to get the cells of a table to to fit onto the screen or whatever width dimension you want, without having the table go off the screen to the right, just use "table-layout: fixed; word-wrap: break-word" like the following css to the table element:
width: 100%; // or whatever you want to set it at
table-layout: fixed;
word-wrap: break-word;
Now your table's cells will all shrink to fit the width you gave the table.