I need someone who knows materializecss to tell me is it possible to make this with materializecss? I googled but didnt find anything for materializecss.
So I am looking for somthing like in this example https://www.codeply.com/go/zAc3W2rzOd
Yes there is a way to slide divs in materializecss. You can actually find some examples at their website. Click here for the examples.
I simply copied one of their slider examples and pasted it into this jsfiddle and the section below.
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.css" />
</head>
<body>
<div class="container" style="padding-top:100px;">
<div class="carousel carousel-slider center" data-indicators="true">
<div class="carousel-fixed-item center">
<a class="btn waves-effect white grey-text darken-text-2">button</a>
</div>
<div class="carousel-item red white-text" href="#one!">
<h2>First Panel</h2>
<p class="white-text">This is your first panel</p>
</div>
<div class="carousel-item amber white-text" href="#two!">
<h2>Second Panel</h2>
<p class="white-text">This is your second panel</p>
</div>
<div class="carousel-item green white-text" href="#three!">
<h2>Third Panel</h2>
<p class="white-text">This is your third panel</p>
</div>
<div class="carousel-item blue white-text" href="#four!">
<h2>Fourth Panel</h2>
<p class="white-text">This is your fourth panel</p>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/js/materialize.js"></script>
<script>
$('.carousel.carousel-slider').carousel({fullWidth: true});
</script>
</body>
</html>
In order to make these sliders work materializecss uses the jQuery plugin Carousel which also has some options.
Related
I'm using Laravel with bootstrap for a project and seem to have run into a responsiveness problem.
I have cards containing data about posts, these cards have rows nested inside.
I want the cards to look identical on desktop as well as on mobile, but Bootstrap keeps breaking my rows.
On Desktop the cards look like I want them to:
But on mobile they look like this:
I have tried using container-fixed, container-fluid as well as col-xs- instead of col-md-.
This is my code:
<div class="card card-sm">
<div class="card-body row align-items-center">
<div class="container">
<div class="col-md-4"><img src="https://pull03-glorybee.netdna-ssl.com/media/catalog/product/cache/1/thumbnail/302x302/9df78eab33525d08d6e5fb8d27136e95/c/e/cedar-hive-0.jpg" style="max-width: 100%;"></div>
<div class="col-md-8">
<h2>Testtitle</h2>
<p>This is just a small testdescription so I don't have to go to the lorem ipsum generator for the sole purpose of showing a bit of text here ...This is just a small testdescription so I don't have to go to the lorem ipsum generator for the sole purpose of showing a bit of text here ...</p>
<hr>
<div class="row">
<div class="col-md-5 align-items-center">
<img src="https://www.weepie-plugins.com/wp-content/uploads/2018/02/5-star-rating-for-WeePie-Plugins-example.gif" style="height: 30px;">
<h5>Some Text here</h5>
</div>
<div class="col-md-3"><img src="https://widopublishing.com/wp-content/uploads/2013/01/Square-Profile-pic-2011edit.jpg" style="max-width: 100%;"></div>
<div class="col-md-4">
<div>
<h5>Username probably..</h5>
<p><br>A Little bit of text there<br></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I have searched around the web but nothing I found really fit my problem, either people usually like the automatic breaking of rows, I'm using them wrong or I searched for the completelly wrong thing.
Thanks in advance!
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<div class="container" >
<div style="overflow-x:auto;">
<div class="card card-sm" style="width: 1000px;overflow-x:auto;">
<div class="card-body" style="">
<div class="row" >
<div class="col-4"><img src="https://pull03-glorybee.netdna-ssl.com/media/catalog/product/cache/1/thumbnail/302x302/9df78eab33525d08d6e5fb8d27136e95/c/e/cedar-hive-0.jpg" style="max-width: 100%;"></div>
<div class="col-8">
<h2>Testtitle</h2>
<p>This is just a small testdescription so I don't have to go to the lorem ipsum generator for the sole purpose of showing a bit of text here ...This is just a small testdescription so I don't have to go to the lorem ipsum generator for the sole purpose of showing a bit of text here ...</p>
<hr>
<div class="d-flex" style="display: flex;">
<div class="rating-img col-4">
<img src="https://www.weepie-plugins.com/wp-content/uploads/2018/02/5-star-rating-for-WeePie-Plugins-example.gif" style="height: 30px;">
<h5>Some Text here</h5>
</div>
<div class="user-img col-4"><img src="https://widopublishing.com/wp-content/uploads/2013/01/Square-Profile-pic-2011edit.jpg" style="max-width: 100%;width: auto;"></div>
<div class="user-info col-4">
<h5>Username probably..</h5>
<p><br>A Little bit of text there<br></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I have one solution for it. use this code if you don't want to break row. this code is as per you wanted. and i have put scroll for responsive.
I hope it would be helpful.
Can anybody tell me how to set up Font Awesome to work with a theme?
I have put this in my template file:
<div id="social-media-bar" class="container">
<div class="row">
<div class="col-md-2 col-md-offset-2">
<i class="fa fa-linkedin-square fa-3" aria-hidden="true"></i>
</div>
<div class="col-md-2">
<i class="fa fa-facebook-square fa-3" aria-hidden="true"></i>
</div>
<div class="col-md-2">
<i class="fa fa-xing-square fa-3" aria-hidden="true"></i>
</div>
<div class="col-md-2">
<i class="fa fa-twitter-square fa-3" aria-hidden="true"></i>
</div>
</div>
</div>
But there are no icons loaded. They aren't loaded in admin mode either but the IP menus have their FA icons as they should.
What am I doing wrong? Are some LESS entries necessary in my theme?
Think I got it - I just have added this line to theme.less:
#import "/Ip/Internal/Core/assets/admin/font-awesome/font-awesome.less";
I have used Bootstraps CDN in the head now:
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
Best way to add css in Impresspages is by using ipAddCSS in you theme header before ipHead(). Thats the same way you can add css to plugins.
For example:
<head>
<?php ipAddCss('Theme/AHS/assets/ahs.css'); ?>
<?php echo ipHead(); ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
How to set 3 images on bootstrap left, center and right on same line
I tried that:
<div class="row">
<img class="col-md-3 pull-right" src="images/right.png" alt="right">
<img class="col-md-3 center-block" src="images/center.png" alt="center">
<img class="col-md-3 pull-left" src="images/left.png" alt="left">
</di>
But the second image is not centered.
The right and left image, should be in the corner of the page.
Is it what you want to achieve?
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container-fluid">
<div class="row">
<div class="col-md-4"><img alt="" src="//placehold.it/200x200/c69/fff/?text=left" class="img-responsive"></div>
<div class="col-md-4"><img alt="" src="//placehold.it/200x200/9c6/fff/?text=center" class="img-responsive center-block"></div>
<div class="col-md-4"><img alt="" src="//placehold.it/200x200/69c/fff/?text=right" class="img-responsive pull-right"></div>
</div>
</div>
You just need to give col-md-4 to each img check out the sample. Run the code snippet and open it in a full page to view properly.
or
Follow the link to view the sample: Sample Link
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<img class="col-md-4" src="http://vignette1.wikia.nocookie.net/logopedia/images/a/a4/Google-Currents-Featured-300x300.png" alt="right">
<img class="col-md-4" src="http://vignette1.wikia.nocookie.net/logopedia/images/a/a4/Google-Currents-Featured-300x300.png" alt="center">
<img class="col-md-4" src="http://vignette1.wikia.nocookie.net/logopedia/images/a/a4/Google-Currents-Featured-300x300.png" alt="left">
I am creating a responsive design in bootstrap3.
I want to modify my template design for tabs. And for that I am using a external js file.
For now I am planning to show them in only desktop version. I am not sure how to have same kind of effect in mobile. SO for now just dektop.
When I am integrating with Bootstrap3 responsive its not working.
However with a plain html file without bootstrap code its working fine.
Would anyone be able to help me to achieve this using Bootstrap3?
I have added the code in js fiddle #
http://jsfiddle.net/monicaRegal/do5b3ko3/1/
Thank You
Regards,
Monica Mandal
If you're needing tabs made with Bootstrap to expand to the full width of the page or their container, use the nav-justified class in your markup.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
Body Content Here
<br />
<br />
<div role="tabpanel">
<!-- Nav tabs -->
<ul class="nav nav-tabs nav-justified" role="tablist">
<li role="presentation" class="active">The Americas</li>
<li role="presentation">Europe</li>
<li role="presentation">Middle East/Africa</li>
<li role="presentation">Asia/Pacific</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="home">The Americas content</div>
<div role="tabpanel" class="tab-pane" id="profile">Europe content</div>
<div role="tabpanel" class="tab-pane" id="messages">Middle East/Africa content</div>
<div role="tabpanel" class="tab-pane" id="settings">Asia/Pacific content</div>
</div>
</div>
You can then style your tabs however you need. View the snippet in full page mode to see it properly.
I have an issue with my Twitter Bootstrat Carousel. The 4 DIV elements which are supposed to appear one after the other all appear together, on top of each other.
I followed CreativityTuts.org tutorial and cannot see where I am wrong...
Here is the HTML code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.carousel').carousel({
interval:2000
});
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="span6 well">
<div id="myCarousel" class="carousel">
<div class="carousel-inner">
<center>
<div class="item active"><img src="bkk.png"></div>
<div class="item"><img src="brr.png"></div>
<div class="item"><img src="buu.png"></div>
<div class="item"><img src="btt.png"></div>
</center>
</div>
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
</div>
</div>
<script src="js/carousel.js"></script>
</body>
</html>
My file structure is the following:
- bkk.png (and the 3 other images)
- css (file)
- fonts (file)
- js (file)
- carousel.js
- bootstrap.js
- bootstrap.min.js
- testcarousel.html
Can anyone help?
Thanks a lot in advance,
Paul
OK guys,
Thanks for your answers, it made me realize that I used code for Bootstrap 2, but actually using Bootstrap 3.
I found needed syntax here:
http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-carousel.php