Background image call problem

UPDATE: Added a third example to show you how to output the path inside a PHP string, per the source code you provided in the comments. There’s nothing wrong with having a full path in your CSS but you want to make sure the path is being dynamically generated by WordPress for the most consistent … Read more

Keep the original ratio in a thumbnail image

CSS Reference: background-size can stretch a background image proportionally using cover or contain. Check out this Demo. HTML <div class=”square”></div> <div class=”rec”></div> CSS .rec, .square { border: solid red 1px; background-color:black; background: url(“https://placeholdit.imgix.net/~text?txtsize=23&txt=120×120&w=120&h=120”); background-size:contain; background-repeat: no-repeat; background-position: center; } .rec { width:100px; height:60px; } .square { width:100px; height:100px; } The remaining space with contain will … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)