$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>wp head - Wp_head () affecting my images layout|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

wp head - Wp_head () affecting my images layout

matteradmin10PV0评论

So, I was trying to create a grid with different sizes, where when you clicked the image would zoom out and show the whole image. For this I need to apply overflow hidden so the images dont lose their ratio when showed in the grid.

I tryed this piece of code in jsfiddle and it worked fine...

<ul class="pppp" style='padding-left: 0; position: relative; 
       background-color: white; font-size:0'>
       <li style='position: relative; display: block; 
       width: 150px; height: 150px; overflow: hidden; 
       background-color: green'>
                <img style='position: relative; display: block; width: 250%; 
                object-position: 50% 50%' class="yImg" 
                src='.aspx?brand=OJ&type=generate&guid=3d98d4a9-f15b-4f6b-bc9e-58f6e9bc97eb&w=768&h=512&t=20181226091336.jpg'/>
       </li>
</ul>

But when copying it to wordpress it resizes the images to fit in the li element. I tried to find what was causing this and when commented out wp_head() it worked as supposed. Do you have a suggestion on how can I overcome this conflict by editing my css and not touching in the wp_head()?

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far