Saturday , February 22 2025

HTML, CSS

HTML, CSS – articles, how-to-fix notes, fast solutions

Anchor link and smooth transition

This case is used for landing pages, for pages with a lot of content. The default anchor link looks like this: <p><a href="#mylink">Anchor link </a></p> <div id="mylink"></div> Sometimes, instead of <div id=”mylink”></div> this code <a name=”mylink”></a> is used, the result will be the same, but w3c validators will complain about …

Read More »

Show and hide block with js

Few examples for showing a block on button click. Example 1: easy to use <script type="text/javascript"> function openlink(id){ display = document.getElementById(id).style.display; if(display=='none'){ document.getElementById(id).style.display='block'; }else{ document.getElementById(id).style.display='none'; } } </script> The block will be opened by clicking on the link: <a href="#" onclick="openlink('mylink'); return false">Open the link</a> Content will be shown when …

Read More »

Fa fa icon not showing

If your icons, for example <i class=”fa fa-arrow-right”></i> are not displayed on your site, you need to try in the <head> section add this line: <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" media="screen" /> Important! Be sure to use https instead of http. If it doesn’t solve the problem, then add this property to …

Read More »

Text with border/border around text in css

This article describes two options for decorating text with a border around the text along the path of the same text. There are, of course, more of these options. But I usually use the ones listed below. Example 1, crappy: using the text-shadow property text-shadow: 1px 0 0 red, -1px …

Read More »