How to Create 4 Grid Blocks in bootstarp with full width - html

How could I possibly create four grid blocks with height and width in percentage so it could automatically resize on mobile, below is the image of what i am talking about.
I mean - 4 grid blocks , one big one at the left , and one at the right top, with the remaining two juts below the second grid block, trust me this is how best i can explain this, i would so much love and appreciate your Help.
<div class="the-home-big-grid">
<div class="the-real-big-grid">
<div class="first-big-guy">
<img src="assets/img/7.jpg" class="img-responsive" />
<div class="biggrid-overlay">
<div class="before-big-grid-overlay-content">
</div>
<p class="the-big-grid-overlay-cat">
Web Designing
</p>
<h2 class="biggrid-the-featured-title">
The Diffrent typs of Desk there is
</h2>
<div class="the-big-grid-featred-post-data">
<img src="assets/img/avatar2.jpg" class="the-auth-post-image-featured" />By Neon Emmanuel <span class="the-featured-post-date"> <i class="fa fa-clock-o the-featured "></i>3rd Dec 2016</span>
</div>
</div>
</div>
</div>
<div class="secound-big-guy">
<img src="assets/img/2.jpg" class="img-responsive" />
<div class="secound-biggrid-overlay">
<div class="before-secound-grid-overlay-content">
</div>
<p class="the-secound-grid-overlay-cat">
Web Designing
</p>
<h2 class="secound-the-featured-title">
The Diffrent typs of Desk there is
</h2>
<div class="the-secound-grid-featred-post-data">
<img src="assets/img/avatar2.jpg" class="the-auth-post-image-featured" />By Neon Emmanuel <span class="the-featured-post-date"> <i class="fa fa-clock-o the-featured "></i>3rd Dec 2016</span>
</div>
</div>
</div>
<div class="third-big-guy">
<img src="assets/img/1.jpg" class="img-responsive" />
<div class="third-biggrid-overlay">
<div class="before-third-grid-overlay-content">
</div>
<p class="the-third-grid-overlay-cat">
Web Designing
</p>
<h2 class="third-the-featured-title">
The Diffrent typs of Desk there is
</h2>
<div class="the-third-grid-featred-post-data">
<img src="assets/img/avatar2.jpg" class="the-auth-post-image-featured" />By Neon Emmanuel <span class="the-featured-post-date"> <i class="fa fa-clock-o the-featured "></i>3rd Dec 2016</span>
</div>
</div>
</div>
</div>
</div>
</div>
Image
Below is the image of what i meain

Here's Bootply: http://www.bootply.com/JlOEZaBkNs
<div class="row">
<div class="col-xs-6">A
</div>
<div class="col-xs-6">
<div class="row">
<div class="col-xs-12">B</div>
</div>
<div class="row">
<div class="col-xs-6">C</div>
<div class="col-xs-6">D</div>
</div>
</div>
</div>

Related

Aligning icon and div using bootstrap classes only

I have this code
<div class="row">
<h3><b>We've got you covered</b></h3>
<h6>Find things to do in cities around the world</h6>
<div class="col-md-4">
<div class="div-icon col">
<i class="fas fa-info h1"></i>
</div>
<div class="div-content col">
<b>Explore top attractions</b>
<p><small>Experience the best of your destination with attractions, tours, activities, and more</small></p>
</div>
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
</div>
I want the icon and text to align like this
The icon and text code
<div class="col-md-4">
<div class="div-icon col">
<i class="fas fa-info h1"></i>
</div>
<div class="div-content col">
<b>Explore top attractions</b>
<p><small>Experience the best of your destination with attractions, tours, activities, and more</small></p>
</div>
</div>
Using col and col does not divide the col-md-4 into two. Is there a way i can display icon and content side by side using only bootstrap classes?
you have to wrap your inner cols with div class="row" and give cols specific size
<div class="col-md-4">
<div class="row">
<div class="div-icon col-md-1">
<i class="fas fa-info h1"></i>
</div>
<div class="div-content col-md-11">
<b>Explore top attractions</b>
<p><small>Experience the best of your destination with attractions, tours, activities, and more</small></p>
</div>
</div>
</div>

How to display cards in a 4 column grid?

I am trying to display 4 similar cards in a grid. I am able to create the columns however the card actions only apply to the first one. (On click, an overlay appears with a 'view details' button and a further description about the product).
On hovering over the other 3 cards, nothing happens. Only the first one works.
<div class="container_grid">
<div class="row">
<div class="col-3">
<div id="product-card" style="margin: 1rem">
<div id="product-front">
<div class="shadow"></div>
<img src="https://veenaazmanov.com/wp-content/uploads/2019/08/Chocolate-Birthday-Cake5-500x500.jpg" alt="" />
<div class="image_overlay"></div>
<div id="view_details">View details</div>
<div class="stats">
<div class="stats-container">
<span class="product_price">Ksh.500</span>
<span class="product_name">Chocolate Cake</span>
<p>Tasty cake</p>
<div class="product-options">
<strong>Available in</strong>
<span>1kg, 2kg, 3kg, 4kg, 5kg</span>
<button class="btn">Add To Cart</button>
<!-- <div class="cart_btn"><p>Add to Cart</p></div> -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-3">
<div id="product-card" style="margin: 1rem">
<div id="product-front">
<div class="shadow"></div>
<img src="https://veenaazmanov.com/wp-content/uploads/2019/08/Chocolate-Birthday-Cake5-500x500.jpg" alt="" />
<div class="image_overlay"></div>
<div id="view_details">View details</div>
<div class="stats">
<div class="stats-container">
<span class="product_price">Ksh.500</span>
<span class="product_name">Chocolate Cake</span>
<p>Tasty cake</p>
<div class="product-options">
<strong>Available in</strong>
<span>1kg, 2kg, 3kg, 4kg, 5kg</span>
<button class="btn">Add To Cart</button>
<!-- <div class="cart_btn"><p>Add to Cart</p></div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
What could be the problem?
Link to the full JFiddle https://jsfiddle.net/5yoerguh/1/
The problem is you use id for div, need change it to class
or use this selector $('.col-3 > div').hover(function(){}
https://jsfiddle.net/viethien/2nesgtLy/1/

Cut the text length as the screen gets smaller

I want the text length to shrink when the screen gets smaller
<div class="dress-card hvr-bob">
<div class="dress-card-head">
<img class="dress-card-img-top" src="img/rdr2.jpg" alt="">
</div>
<div class="dress-card-body">
<h2 class="dress-card-title">Red Dead Redemption 2</h2>
<p class="dress-card-para">Social Club Key</p>
<p class="dress-card-para"><span class="dress-card-price">200TL  </span>
<!--<span class="dress-card-crossed">300TL</span><span class="dress-card-off"> İndirim!</span>--></p>
<div class="row">
<div class="col-md-6 card-button">
<a style="text-decoration: none;" href="">
<div class="card-button-inner bag-button"><i class="fas fa-shopping-cart"></i> Satın Al</div>
</a>
</div>
<div class="col-md-6 card-button">
<a style="text-decoration: none;" href="">
<div class="card-button-inner wish-button"><i class="fas fa-shopping-basket"></i> Sepete Ekle</div>
</a>
</div>
</div>
</div>
</div>
</div>
help
Add font-size:8vw; to your CSS. You can add it to p or specific for a class or id.
You can change the 8 to any number you want.
I hope thats what you searching :)

How to use inline-block

I have some ads I want placing side by side and making all the same size but, whilst float: left works to get them to float left, display: inline-block, which should stack them in a grid side by side, and max-width doesn't.
Tried Css
#media (min-width: 768px){.box-
layout {max-width: 100%; float:
left; display: inline-block;}}
This, as mentioned, floats left but doesn't place side by side or make all the ads the same size. It also throws up a css lint obstruction that float and display can not be used together.
https://adsler.co.uk/find-an-event/
HTML:
<div class="line-layout"
style="display: none;">
<li class="event_listing post-6985
type-event_listing status-expired
hentry" style="visibility:
visible;" data-latitude="" data-
longitude="">
<div class="event-
info-row-listing">
<a href="https://adsler.co.uk/
event/new-cross-and-deptford-free-
film-festival/">
<div class="row"><div class="col-
md-1">
<div class="organizer-logo">
<img alt="Deptford Film Festival"
src="https://adsler.co.uk/wp-
content/uploads/event-manager-
uploads/event_banner/2019/05/2
456d41f16399aed538d25b1cd32ad1
4.jpg">
</div>
</div><div class="col-md-4">
<div class="event-title">
<h4>New Cross and
Deptford Free Film Festival</h4>
<div class="boxes-view-
listing-
registered-code">
</div>
<div class="event-
organizer-
name">
<normal>Deptford Film Festival
<normal></normal>
</normal>
</div>
</div>
<div class="col-md-2">
<div class="date"
<date>2019-05-26</date>
</div>
</div>
<div class="col-md-3">
<div class="event-
location"><i class="glyphicon
glyphicon-map-
marker"></i> London </div>
</div>
<div class="col-md-2">
<div class="event-
ticket">#free</div>
</div>
<div class="col-md-3">
</div>
</div>
</a>
</div>
</li>
</div>
<!-- Box Layout -->
<a class="event_listing post-6985
type-event_listing status-expired
hentry" href="https://adsler.co.uk
/event/new-cross-and-deptford-free-
film-festival/">
<div class="box-layout">
<div class="event-img"><img
alt="Deptford Film Festival"
src="https://adsler.co.uk/wp-
content/uploads/event-manager-
uploads/event_banner/2019/05/2
456d41f16399aed538d25b1cd32
ad14.jpg"></div>
<div class="boxes-view-box-
registered-code">
</div>
<div class="event-title">
New Cross and Deptford Free Film
Festival
</div>
<div class="event-start-
date">2019- 05-26
</div>
<div class="event-location">
<i class="glyphicon glyphicon-
map-
marker"></i> London </div>
<div class="box-footer">
<div class="event-
ticket">#free</div>
</div>
</div>
</a>
your html and css are quite chaotic.
I made an example how it should be and how it works.
Ps. don't pay attention to
max-width:800px;
thats just for demo purposes.
https://codepen.io/anon/pen/QXWLrg
Hope it helps you out!

Why not my link on the mobile?

I have this site:
http://infine-traiteur.ch/
We have 4 elements on the first page (I put a picture to understand that I mean)
http://i57.tinypic.com/288silx.jpg
If we click on a particular image (the high resolution) everything works, if you resize the window and reach the mobile links these 4 elements only and do not understand why it works.
This is code HTML:
<div class="row">
<div class="carouselspaceholder"> </div>
<div class="six columns">
<div class="cro_fpc cro_fpbig">
<div class="cro_backgroundmask"> </div>
<img class="attachment-fc1 wp-post-image" alt="front (3)" src="http://infine-traiteur.ch/wp-content/uploads/2014/09/front-3.jpg" height="340" width="465">
<div class="fptitles">
<h3 class="fptitle cro_accent">
Commandez-votre service traiteur
</h3>
</div>
<div class="slidelinkspan">
Plus d'infos
</div>
</div>
<div class="cro_fpc cro_fpsmall">
<div class="cro_backgroundmask"> </div>
<img class="attachment-fc2 wp-post-image" alt="front (1)" src="http://infine-traiteur.ch/wp-content/uploads/2014/09/front-1.jpg" height="170" width="465">
<div class="fptitles">
<h3 class="fptitle cro_accent">
Nos partenaires
</h3>
</div>
<div class="slidelinkspan">
Plus d'infos
</div>
</div>
</div>
<div class="six columns">
<div class="cro_fpc cro_fpsmall">
<div class="cro_backgroundmask"> </div>
<img class="attachment-fc2 wp-post-image" alt="front (1)" src="http://infine-traiteur.ch/wp-content/uploads/2014/09/front-1.png" height="170" width="465">
<div class="fptitles">
<h3 class="fptitle cro_accent">
Rejoignez-nous sur Facebook
</h3>
</div>
<div class="slidelinkspan">
Plus d'infos
</div>
</div>
<div class="cro_fpc cro_fpbig">
<div class="cro_backgroundmask"> </div>
<img class="attachment-fc1 wp-post-image" alt="front (2)" src="http://in-fine.dg-site.com/wp-content/uploads/2014/09/front-2.jpg" height="340" width="465">
<div class="fptitles">
<h3 class="fptitle cro_accent">
Suggestions de la semaine
</h3>
</div>
<div class="slidelinkspan">
Plus d'infos
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
Can you help me to solve this problem please?
Thanks in advance!
Lines from 4627 to 4643 in your site.css file (Media queries for mobile)
Remove or comment this lines.