By default, many web browsers will open files like .js and other text-based files in a new tab. However, if you want users to be able to download these files directly, such as you might with .zip files, you can easily achieve this by adding the download attribute to your …
Read More »HTML, CSS
How to disable click on links using CSS?
Easy question, easy solution. We can disable click on all links, or we can use id or class for the particular links that should be unlickable and use: pointer-events: none; I use it for the case when I need to disable clicks on the images to avoid popup windows on …
Read More »How to open html pages without .html
If your site uses links like http://domain.com/testpage.html and http://domain.com/demo.html, and you want them to open like http://domain.com/testpage and http://domain.com/demo, you can use this solution. Go through FTP or a File Manager to the folder with the site files. Open file .htaccess and add the following code: RewriteEngine on RewriteBase / …
Read More »Css styles for WordPress admin in functions.php
If you need to add individual styles, and they are only a couple of lines, you can add them directly to functions.php: add_action('admin_head', 'webinp_style'); function webinp_style() { print '<style> tr[data-slug="to-top"] {display: none !important;} </style>'; } Between <style> and <style> you need to write your own CSS styles.
Read More »Color change for placeholder in input not working
By default, gray font is displayed, which does not blend well with a dark background. If in css it is easy to change the background for the input, then I had to find a solution for the text color in the placeholder. This example helped me solve the problem (the …
Read More »Fa fa Telegram icon not showing
Usually, after making edits according to the instruction “Fa fa icon is not displayed”, all icons are displayed correctly. But not telegram, which is not mentioned at all in the included CSS from font-awesome. So open up your CSS and add this one: .fa-telegram:before {content: "\f2c6"; }
Read More »Open expanded block by link in accorderon/spoiler/toggle
The case can be like this – for example, from the main page you need to place links to an internal page where a list of questions and answers is placed. On the inner page, the link should expand the answer to a specific question. The solution is here: HTML …
Read More »How to make CSS fractional list for ul li
To display the content of the article, it is not enough to display standard nested lists, because the view will be like this: 1 1 2 3 4 2 1 2 3 4 3 1 2 3 4 I need this view to be like this (the nested sub-items are …
Read More »How to add custom CSS for WordPress admin panel
If you need to place a few CSS lines for the admin panel, then edit the file functions.php at the root of the theme, and add it to the end of the file: add_action('admin_head', 'admin_styles'); function admin_styles() { echo '<style> .update-nag {display: none !important;} </style>'; } Instead of the .update-nag …
Read More »Display: inline-block does not stretch to width, but sticks to the left In Safari
The problem is described in the title of this article. If elements that in normal browsers stretch across the width of the stage with active display: inline-block; in Safari ignore the width and stick together on the left, then for the parent to which this inline-block was assigned, try to …
Read More »