12.07.2018 Views

7 Best Useful CSS Tips to Consider

Here are some significant and useful CSS tips and tricks that can be helpful for developers.

Here are some significant and useful CSS tips and tricks that can be helpful for developers.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

guarantee that. The secret is <strong>to</strong> create the height of the menu and<br />

therefore the line-height of the text constant. I see this method a<br />

great deal once I return and edit existing websites for purchasers.<br />

Here is an example:<br />

.nav li{<br />

}<br />

line-height:50px;<br />

height:50px;<br />

7. Easily Resize Images <strong>to</strong> Fit<br />

Sometimes you get during a pinch wherever pictures have <strong>to</strong> be<br />

compelled <strong>to</strong> work a definite dimension whereas scaling<br />

proportionately. An easy way <strong>to</strong> do that is <strong>to</strong> use max-width <strong>to</strong><br />

handle this.<br />

Example:<br />

img {<br />

}<br />

max-width:100%;<br />

height:au<strong>to</strong>;<br />

This means that the biggest the image might ever be is 100%, and<br />

also the height is au<strong>to</strong>matically calculated, supported the image<br />

dimension. In some cases, you would possibly have <strong>to</strong> be compelled

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!