How to overaly with an height transform css3 - css

I'm trying to create a group of boxes where in the beginning has few info, and when hovering displays more info.
I achieved it but I have a problem related with the position of the other boxes. Every time I hover over one box, the others change their position because I'm applying a height and a width in hover. It work fine if I comment height and width in hover but I need to maintain de box-shadow at all time
Here you can check the test: https://jsfiddle.net/p4av5ejv/
HTML:
<div class="partnerLlistat">
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
</div>
CSS:
I cannot define CSS code because I don't know how to format well to be valid. Check in jsFiddle link.
Can anybody help me with this?, I googled a lot and stackoverflowing a lot but nothing exactly what I need.
Thank you for your time!

OK. I found the solution.
HTML
<li id="partnerBox" class="partnerBox">
<h3>Nom: aaa</h3>
<h4 class="VisibleOnHover">Entitat: aaa</h4>
<p>Tipus de servei: aaa</p>
<div class="VisibleOnHover">
<p>Adreça: aaa</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://aaa.net">http://aaa.net</a></p>
<p>Correu electrònic: aaa#gmail.com</p>
<p>Avantatge que ofereix: aaa aaa</p>
</div>
</li>
<li id="partnerBox" class="partnerBox">
<h3>Nom: bbb bbb</h3>
<h4 class="VisibleOnHover">Entitat: bbb</h4>
<p>Tipus de servei: bbb</p>
<div class="VisibleOnHover">
<p>Adreça: bbb</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://bbb.net">http://bbb.net</a></p>
<p>Correu electrònic: bbb#gmail.com</p>
<p>Avantatge que ofereix: bbb bbb</p>
</div>
</li>
<li id="partnerBox" class="partnerBox">
<h3>Nom: ccc ccc</h3>
<h4 class="VisibleOnHover">Entitat: ccc</h4>
<p>Tipus de servei: ccc</p>
<div class="VisibleOnHover">
<p>Adreça: ccc</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://ccc.net">http://ccc.net</a></p>
<p>Correu electrònic: ccc#gmail.com</p>
<p>Avantatge que ofereix: ccc ccc</p>
</div>
</li>
<li id="partnerBox" class="partnerBox">
<h3>Nom: ddd ddd</h3>
<h4 class="VisibleOnHover">Entitat: ddd</h4>
<p>Tipus de servei: ddd</p>
<div class="VisibleOnHover">
<p>Adreça: ddd</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://ddd.net">http://ddd.net</a></p>
<p>Correu electrònic: ddd#gmail.com</p>
<p>Avantatge que ofereix: ddd ddd</p>
</div>
</li>
</ul>
Again, I don't know how to insert formatted CSS here, so check jsfiddle link to see this code.
Check this to see how to solve that. In jsfiddle you cannot appreciate well, because you have to tune the padding and margin in the .partnerLlistat > li[id^="partnerBox"]:hover rule to your site.

Related

I want to add a specific style to the first image but everything I have tried will not work

Trying to select the first img. I have tried using .flex-projext > img:first-child but it will not work
<section id="work">
<h2 class="projects">These are some of my projects</h2>
<div class="grid-class">
<div class="flex-project first">
<img src="picsforportfolio1/landing.jpg">
<p class="project">Landing Page</p>
</div>
<div class="flex-project">
<img src="picsforportfolio1/survey.jpg">
<p class="project">Survey Form</p>
</div>
<div class="flex-project">
<img src="picsforportfolio1/tribute.jpg">
<p class="project">Tribute page</p>
</div>
<div class="flex-project">
<img src="picsforportfolio1/tingdog.jpg"> `enter code here`
<p class="project">TingDog</p>
</div>
</div>
</section>
This worked with me:
.flex-project:first-child img
Here is the output:
And here is the output with object-fit applied to first child only:

How to dynamically display image with style background in ejs

How do I display an image with style and background-image in ejs template
This is working:
But this is not working:
this is my full code
<div class="row d-flex">
<% upcoming_events.forEach(event=> { %>
<div class="col-lg-4 ftco-animate">
<div class="blog-entry">
<a href="blog-single.html" class="block-20" style="background-image: url('<%=event.eventImage %>' )">
</a>
<div class="text d-block">
<div class="meta">
<p>
<span class="fa fa-calendar mr-2"></span>Sept. 06, 2020
<span class="fa fa-user mr-2"></span>Admin
<span class="fa fa-comment mr-2"></span> 3
</p>
</div>
<h3 class="heading">Best for any industrial & business solution</h3>
<p>Read more</p>
</div>
</div>
</div>
<%}) ;%>
</div>
Note, when I inspect it on the browser it shows the AWS image URL correctly but the image does not show.

image in bootstrap jumbotron beside title

I have the following bootstrap jumbotron, but its not working as desired.
div class="jumbotron" style="color:#ffffff">
<div>
<div style="display:inline-block;">
<img src="~/Content/Images/3.png" height="10%" width="10%" />
</div>
<div style="display:inline-block;">
<h1 class="display-3">Welcome to My Site!</h1>
</div>
</div>
<div>
<p class="lead">
● brag about something good
</br>
● brag about another good thing
</br>
● make same vague promise
</p>
</div>
<hr class="my-4">
<p>
insert some fake aspirations and use the phrase 'we strive to'
</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="#" role="button">Visit</a>
</p>
</div>
I want it to look like this-ish
Help, please.
Here is an example which may help you:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<div class="jumbotron bg-dark text-white">
<div class="media">
<img class="mr-3" src="http://rs882.pbsrc.com/albums/ac23/Silllyghostfreak/My%20Fakegees/Seelzplz.png~c200" height=64>
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
<p class="lead mb-0">● brag about something good</p>
<p class="lead mb-0">● brag about another good thing</p>
<p class="lead mb-0">● make same vague promise</p>
</div>
</div>
</div>

Wordpress Alternative Post Column

I want to add the wordpress post loop with posts from category-name feature to it, for alternative column. Here is the image sample of what i am trying to achieve, and below the image is the html i have built to work it, thanks.
here is the image sample
here is my code
<div class="row featured">
<div class="grid-box grid-box-1 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/video-post/">
<div class="caption">
<div class="cat"><span>News</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
<i class="fa fa-video-camera"></i> Video
</div>
<h2 class="title">Video Post with Featured Image</h2> </div>
<div class="quad wp-post-image"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>
<div class="grid-box grid-box-2 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/post-with-more-tag/">
<div class="caption">
<div class="cat"><span>Lifestyle</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
<i class="fa fa-video-camera"></i> Video
</div>
<h2 class="title">Post With More Tag</h2>
</div>
<div class="vm-featured"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>
<div class="grid-box grid-box-3 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/vimeo-video-post/">
<div class="caption">
<div class="cat"><span>What's New</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
</div>
<h2 class="title">Vimeo Video Post</h2>
</div>
<div class="quad wp-post-image"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>
<div class="grid-box grid-box-4 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/post-with-image-and-text/">
<div class="caption">
<div class="cat"><span>News</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
</div>
<h2 class="title">Post with Image and text</h2>
</div>
<div class="quad wp-post-image"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>

HTML Anchor Jump Doesn't Work

The title means what it says. when i setup a link to jump to a certain div it doesn't work. For example when i say <a href="#Section1>Section 1</a> and click it, it should jump to the anchor tag with the name of 'Section1' <a name="Section1"></> but nothing happens.
<main id="Main">
<div class="Container">
<div class="Section-Links Left Box-Sizing">
<div class="Links">
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
</div>
</div>
<div class="Sections Left Box-Sizing">
<div class="Section">
<a name="Test"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test2"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test3"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test4"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test5"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test6"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test7"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test8"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test9"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test10"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
</div>
<div class="Clear"></div>
</div>
<p class="Footer-Masthead">Created By Moussa Harajli.</p>
</main>
if you would like to test this go here. http://67.184.73.19/Projects/Assassins/rules.php
Anchor links doesn't point to names but to ids
so change for example:
<a name="Test7"></a>
to:
<a id="Test7"></a>
And you should not change the capitalization of the ids in the id attribute and the links.
Try setting the id in the div tag:
<div id="test" class="Section">...</div>
And this should work:
Test Post
The reason behind your problem is that you have different ID's in your links since test2 is not the same as Test2.
Though... from my experience the <a> element is essentially redundant since the following works in all modern browsers:
<main id="Main">
<div class="Container">
<div class="Section-Links Left Box-Sizing">
<div class="Links">
Test Post
Test Post
</div>
</div>
<div class="Sections Left Box-Sizing">
<div id="test" class="Section">
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div id="test2" class="Section">
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>

Resources