Photo by Marvin Meyer on Unsplash

3 Tricks To Make Styling Web Easy

These tricks may not be always recommended but as suggested, can help get things done faster.

1 . Creating buttons — Still, using regular buttons? Ever tried customizing anchor tags to button. With few lines of code, an anchor can be changed to the button.

<a href= '/'style ="text-decoration:none;padding:20px;border:1px solid black"> I m a button </a>

2. Perfectly styling a footer — A correctly placed footer is always wanted by developers but it can also be achieved every time.

  • Start by making the body (which contains the main div and footer) a flex.
  • Once it’s done, give the main div a height of 100%.

That’s it !! You’re done. Footer is guaranteed to stay just at the foot of the document every time.

3. Using templating engines to dynamically populate your variable values in HTML. A simple example of syntax being :

A templating engine helps to access our variables in HTML. There are many more such as Pug, Handlebars. The reason why I love EJS is its syntax being very similar to JavaScript.

These were few things which I found really helpful.

Kudos to my mentor Naquiuddin Khaja for sharing these!

Thanks for reading !!

By the way, 👏🏻 *clap* 👏🏻 your hands (up to 50x) if you enjoyed this post. It encourages me to keep weekly writing and help other people finding it :)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store