I hope you can help me. I'm working on my new portfolio website and need a bit of help on hover effects in work showcase section. I'm not good developer so excuse me if my code sux x), I do design mostly. And ye, i used Bootstrap 3.0 as my framework.
// Here is the HTML code //
<div class="portfolio" id="portfolio"> <!-- portfolio begin -->
/unimportant stuff...../
<div class="container my-creations">
<div class="row">
<div class="col-md-3">
<a href="#">
<div class="circle">
<img src="img/gmedia.png" alt="" id="gmedia" width="115" height="115">
</div>
</a>
</div>
<div class="col-md-3">
<a href="#">
<div class="circle">
<img src="img/ginc.png" alt="" id="ginc" width="136" height="114">
</div>
</a>
</div>
<div class="col-md-3">
<a href="#">
<div class="circle">
<img src="img/fgeeks.png" alt="" id="fgeeks" width="107" height="115">
</div>
</a>
</div>
<div class="col-md-3">
<a href="#">
<div class="circle">
<img src="img/weboxit.png" alt="" id="wbx" width="115" height="115">
</div>
</a>
</div>
</div> <!-- end of row -->
</div> <!-- end of my-creations -->
</div> <!-- end of portfolio -->
//And here is the following CSS//
.portfolio {height: 100%;}
.my-creations {margin-top: 60px;}
.circle {
width: 270px;
height: 270px;
line-height: 270px;
border-radius: 1000000px;
background-color: #262d30;
border: 8px solid #2c3235;
text-align: center;
background-image: url('img/gmedia.png') no-repeat;}
.circle img {
vertical-align: middle;
display: inline-block;
margin-bottom: 15px;
filter: url(filters.svg#grayscale); /* Firefox */
filter: gray; /* IE */
-webkit-filter: grayscale(1); /* Webkit */ }
#ginc {margin-bottom: 30px;}
.circle img:hover {
filter: none;
-webkit-filter: grayscale(0);}
And here are my questions:
Is there a way when hover .circle that my img changes filter?
And how can I apply fade hover on img? So that it slowly goes from black and white to colorful image. ---- ANSWERED, THANKS bboysupaman and JoshC!
I hope you can help me, and if you need more info, just ask.
You can use CSS transitions!
Add the following to your css. =)
.circle img
{
transition: all 2s;
-webkit-transition: all 2s;
}
.circle:hover img {
opacity:.5;
}
On the other hand, you can use Jquery to make animation. I am pretty sure that Twitter-bootstrap comes Jquery code too.
However, if you are worried about performance, you can stick with css3.
HTML Code:
<div class="circle1">
<img src="http://upload.wikimedia.org/wikipedia/commons/0/0e/Ski_trail_rating_symbol-green_circle.svg"
width="80px" height="80px" />
</div>
Jquery Code:
$(document).ready(function () {
$(".circle1").mouseenter(
function () {
$(".circle1").fadeOut();
});
$(".circle1").mouseleave(
function () {
$(".circle1").fadeIn();
});
});
Here is an example of jsfiddle.
http://jsfiddle.net/7MV6Q/
Related
So I have footer section on the website I'm currently building, and the problem is order of them showing. I want to social icons be above ©
Have a look: footer
html:
<div id="footerbot">
<div class="container">
<div class="row">
<div class="col-md-6">
<h5 class="fbh">©2018 - Appo, All Right Reserved</h5>
</div>
<div class="col-md-6">
<img src="img/facebook.png" href="#">
<img src="img/twitter.png" href="#">
<img src="img/dribble.png" href="#">
<img src="img/gplus.png" href="#">
<img src="img/youtube.png" href="#">
</div>
</div> <!-- end of row -->
</div>
css:
#footerbot {
background-color: rgba(34, 48, 71, 0.8);
}
#footerbot img {
display: block;
float: right;
top: 50%;
padding-top: 35px;
padding-left: 15px;
}
#footerbot h5 {
color: #00FFF0;
line-height: 100px;
}
I tried to add class 'order-md-6' to each div with col-md-6, but first of all it didn't work, and secondly it broke layout - it 'pushed' both elements to center. Is it even possible in bootstrap4? I also have a problem centering these items u can see on image I've upload. I'm struggling with this for 2hours and I have no idea how to get this done. I would appreciate any help. Thanks
Bootstrap 4 uses flexbox to position the columns in their rows so you can add the following to your CSS to the control the order of the columns:
.col-md-6:last-child {
order: -1;
}
Not sure if what you provided is the full code sample of your footer or not, but if that's your full html, you're missing a closing tag.
Also, assuming all you want are the icons to go above the copyright line and centered, try this:
#footerbot .socialIcons {
text-align: center;
}
<div id="footerbot">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="socialIcons">
<img src="img/facebook.png" href="#">
<img src="img/twitter.png" href="#">
<img src="img/dribble.png" href="#">
<img src="img/gplus.png" href="#">
<img src="img/youtube.png" href="#">
</div>
<h5 class="fbh">©2018 - Appo, All Right Reserved</h5>
</div>
</div> <!-- end of row -->
</div>
</div>
I'm relatively new at this level of complexity – at any rate, creating a webpage on the Squarespace platform which will feature a code block that presents a grid of 12 clickable tiles with Hover response and click through functionality. While Squarespace has built in responsiveness, whatever is in the code block is exempt from that.
So, the problem I'm having is that my nicely centered grid of 12 tiles is only centered when displayed on a fully open browser window. As the browser window diminishes in size and the tiles begin stacking, the grid aligns to the right. I've already put the gallery in a div in order to get the original centering.
Is there a way to force centering regardless of browser size?
To see the behavior in action, change Result window size of jsfiddle:
http://jsfiddle.net/terryogara/VQ3hk/
Thank you, and here's the code:
<style type="text/css">
.caption-style-1 li{
list-style-type: none;
margin: 0px;
padding: 5px;
position: relative;
overflow: hidden;
}
.caption-style-1 li:hover .caption{
opacity: 1;
}
.caption-style-1 li:active .caption{
opacity: .5;
}
.caption-style-1 img{
float: left;
}
.caption-style-1 .caption{
cursor: pointer;
position: absolute;
opacity: 0;
-webkit-transition:all 0.45s ease-in-out;
-moz-transition:all 0.45s ease-in-out;
-o-transition:all 0.45s ease-in-out;
-ms-transition:all 0.45s ease-in-out;
transition:all 0.45s ease-in-out;
}
.caption-style-1 .blur{
background-color: rgba(0,0,0,0.65);
height: 180px;
width: 180px;
position: relative;
}
.caption-style-1 .caption-text{
position: absolute;
width: 180px;
height: 180px;
text-align: center;
top:10px;
}
.outer-container {
width: 100%;
min-width: 980px
margin: 0 auto;
text-align: center;
}
.inner-container {
display: inline-block;
}
</style>
<!-- CONTENT -->
<!-- OUTER CONTAINER -->
<div class="outer-container">
<ul class="caption-style-1">
<!-- ROW 1 TOP | IMAGE GALLERY 1 -->
<div class="inner-container">
<!-- IMAGE 1 -->
<div style="float: right;">
<div style="float: right;">
<a href="http://www.example.com">
<li>
<img src="http://murmurhaus.com/wp-content/uploads/2014/07/ph-180x180.png" height="180" width="180" alt="ALT">
<div class="caption">
<div class="blur"></div>
<div class="caption-text">
<h1>TEXT HERE</h1>
</div>
</div>
</li></a>
</div>
<!-- IMAGE 2 -->
<div style="float: right;">
<a href="http://www.google.com">
<li>
<img src="http://murmurhaus.com/wp-content/uploads/2014/07/ph-180x180.png" height="180" width="180" alt="ALT">
<div class="caption">
<div class="blur"></div>
<div class="caption-text">
<h1>TEXT HERE</h1>
</div>
</div>
</li></a>
</div>
</div>
<!-- IMAGE 3 -->
<div style="float: right;">
<div style="float: right;">
<a href="http://http://stackoverflow.com/">
<li>
<img src="http://murmurhaus.com/wp-content/uploads/2014/07/ph-180x180.png" height="180" width="180" alt="ALT">
<div class="caption">
<div class="blur"></div>
<div class="caption-text">
<h1>TEXT HERE</h1>
</div>
</div>
</li></a>
</div>
<!-- IMAGE 4 -->
<div style="float: right;">
<li>
<img src="http://murmurhaus.com/wp-content/uploads/2014/07/ph-180x180.png" height="180" width="180" alt="ALT">
<div class="caption">
<div class="blur"></div>
<div class="caption-text">
<h1>TEXT HERE</h1>
</div>
</div>
</li></a>
</div>
</div>
<!-- END GALLERY 1-->
<!-- CLOSE INNER CONTAINER -->
</div>
<!-- CLOSE OUTER CONTAINER -->
</ul>
</div>
<!-- END ROW 1 -->
Hai I am new in html and css.I need some help.I have 4 images given below.
The main Background image
Link image1
Link image2
Link image13
And I need to look the all images finally like
Final Look
My html is like
<div class="aside__block social-media-follow">
<div class="aside-block__content">
<img src="/media/19134/001.jpg"/>
<img src="/media/19133/Twetter.jpg"/>?
<img src="/media/19133/facebok.jpg"/>
<img src="/media/19133/insta.jpg"/>
</div>
</div>
Can any one help on css to position the social link images.
<div class="aside__block social-media-follow">
<div class="aside-block__content">
<img src="http://i.stack.imgur.com/mxD7P.jpg"/>
<img src="http://i.stack.imgur.com/lBlEE.jpg"/>
<img src="http://i.stack.imgur.com/FbE0s.jpg"/>
</div>
</div>
In css:
.aside-block__content {
background: url("http://i.stack.imgur.com/msmci.jpg") no-repeat;
width: 310px;
height: 100px;
}
.aside-block__content a img{
float: right;
margin-top: 50px;
margin-right: 30px;
}
DEMO : http://jsbin.com/kexam/1/edit
You can put the "follow us" image as a background image and float the icons right with margin-top and right to position them as desired :
FIDDLE
HTML:
<div class="aside__block social-media-follow">
<div class="aside-block__content">
<img src="http://i.stack.imgur.com/lBlEE.jpg"/>
<img src="http://i.stack.imgur.com/mxD7P.jpg"/>
<img src="http://i.stack.imgur.com/FbE0s.jpg"/>
</div>
</div>
CSS:
.aside-block__content {
width:314px;
height:115px;
background-image: url(http://i.stack.imgur.com/msmci.jpg);
}
.aside-block__content a{
float:right;
margin:50px 30px 0 0;
}
There are a couple of ways to do this.
You could do this by...
HTML:
<div id="wrapper"> <!-- wrapper with the background - image -->
<div id="social_media"> <!-- a container for the social media icons -->
<img class="icon" src="/media/19133/Twetter.jpg"/> <!-- Your Icons -->
<img class="icon" src="/media/19133/facebok.jpg"/>
<img class="icon" src="/media/19133/insta.jpg"/>
</div>
</div>
Css:
#wrapper { background: url(/media/19134/001.jpg) no-repeat; }
#social_media { /* Your positioning */ }
.icon { float:right; margin-left: 20px; }
I've set up some features boxes on my home page, however the background image .../images/darker.png is only showing on the left of the image, leaving the remains of the box transparent.
Here is my CSS code for my Home-Boxes:
/* Features Area */
.box { background-repeat: repeat-y; background-position: 0 0; }
.box .box-b { background-repeat: no-repeat; background-position: 0 bottom; }
.box .box-t { background-repeat: no-repeat; background-position: 0 top; }
.home-box {
float: left; display: inline; width: 314px;
background-image: url(images/darker.png);
margin-right: 19px;
}
.home-box .box-b { background-image: url(images/darker.png);}
.home-box .box-t { background-image: url(images/darker.png); padding: 10px 20px; }
.home-box h4 {
font-size: 16px; color: #36429B; font-weight: bold; text-transform: none;
}
.home-box a {
color: #1a8f1d; font-weight: bold; padding-top: 5px; display: block;
}
.home-box img.right { margin-top: 50px; }
.cl {
display: block; height: 0; font-size: 0; line-height: 0;
text-indent: -4000px; clear: both;
}
Here is my HTML for the home boxes..
<!-- home boxes -->
<div class="box home-box">
<div class="box-b">
<div class="box-t">
<h4>Control Panel</h4>
<!--<img src="css/images/home-box-image1.gif" alt="" class="right" />-->
<p>We use an ultra-sleak, clean control panel that is rarely used by other companies, it's fast and extremely easy to use, full of brand new features!</p>
<div class="cl"> </div>
</div>
</div>
</div>
<div class="box home-box">
<div class="box-b">
<div class="box-t">
<h4>Powerful Hardware</h4>
<!--<img src="css/images/home-box-image2.gif" alt="" class="right" />-->
<p>Using powerful machines, nothing is a match for our hardware and we can provide you with fast and responsive customs at all times!</p>
<div class="cl"> </div>
</div>
</div>
</div>
<!-- second line -->
<div class="box home-box last">
<div class="box-b">
<div class="box-t">
<h4>Server Mod Support</h4>
<!--<img src="css/images/home-box-image3.gif" alt="" class="right" />-->
<p><b>We support almost every server mod including Tekkit, Bukkit, Hexxit and much more. Need help installing them? Submit a ticket!</b></p>
<div class="cl"> </div>
</div>
</div>
</div>
<div class="box home-box">
<div class="box-b">
<div class="box-t">
<h4>Specialized Support</h4>
<!--<img src="css/images/home-box-image1.gif" alt="" class="right" />-->
<p>We have a professional support team who are always happy to help, and are fast and caring about what they do. You can rely on us!</p>
<div class="cl"> </div>
</div>
</div>
</div>
<div class="box home-box">
<div class="box-b">
<div class="box-t">
<h4>Migration Assistance</h4>
<!--<img src="css/images/home-box-image2.gif" alt="" class="right" />-->
<p>If you have a server elsewhere and want to move to us, we'll help you transfer all your files and data, apsolutely free of charge!</p>
<div class="cl"> </div>
</div>
</div>
</div>
<div class="box home-box last">
<div class="box-b">
<div class="box-t">
<h4>Hardware Specs</h4>
<!--<img src="css/images/home-box-image3.gif" alt="" class="right" />-->
<p>E3-1270v3<br />32GB DDR3 ECC Memory<br />240GB Solid-State Drives<br />1Gbps Uplink</p>
<div class="cl"> </div>
</div>
</div>
</div>
<!-- end home boxes -->
As you can see the home-boxes are overlapping the footer. The footer should have about a 1 centimeter space above it so nothing overlaps it. Also, the background image for the footer is showing 2 colors but the background of the footer is only supposed to be 1 color.
Here is the image script, please refer to previous code for the image style.
bg-image="/images/darker.png".
I would appreciate any help I could get here.
For further information on this problem, here is a link to my site: http://cudahost.com/new
For the home boxes, you need to set the background to repeat:
.box {
background-repeat: repeat;
background-position: 0 0;
}
In fact, if I understand your problem correctly, the style on the inner div needs changing too. Currently you prevent the background repeating using no-repeat, instead:
.box .box-b {
background-repeat: repeat;
background-position: 0 bottom;
}
I am trying to align all three images so they are centered in the row, evenly.
Here is a fiddle of the markup, http://jsfiddle.net/bkmorse/btCRk
<div class="container"
<div class="row" style="border:1px solid red;">
<div class="span12">
share on facebook
share on twitter
send an email
</div>
</div>
</div>
a.share-icon {
height:64px;
display: inline-block;
width:64px;
text-decoration: none;
text-indent: -10000px;
font-size: 0px;
line-height: 0px;
}
a.share-icon.facebook {
background: #fff url('http://f.cl.ly/items/3F1o172Z1o0824021F2C/facebook.jpg') no-repeat;
}
a.share-icon.twitter {
background: #fff url('http://f.cl.ly/items/3C3I1B0g0o0V3V1Z3i2I/twitter.jpg') no-repeat;
}
a.share-icon.email {
background: #fff url('http://f.cl.ly/items/3E1e0o3a0s0I3G3r2X2T/email.jpg') no-repeat;
}
I've tried text-align:center; I've tried pull-left/right. I am not having any luck. Any help is appreciated.
Thanks!
Or, you can use the text-center class..
<div class="container">
<div class="row" style="border:1px solid red;">
<div class="span12 text-center">
share on facebook
share on twitter
send an email
</div>
</div>
</div>
Demo: http://bootply.com/70873
text-align:center won't work for centering block elements, only inline elements. Considering you're using Twitter Bootstrap, here's 2 ways you can do this:
Option 1 - use span4s then display the links as blocks with fixed width and margin:0 auto
<div class="container">
<div class="row" style="border:1px solid red;">
<div class="span4">
share on facebook
</div>
<div class="span4">
share on twitter
</div>
<div class="span4">
send an email
</div>
</div>
</div>
a.share-icon {
height:64px;
display: block;
width:64px;
margin: 0 auto;
text-decoration: none;
text-indent: -10000px;
font-size: 0px;
line-height: 0px; }
a.share-icon.facebook { background: #fff url('http://f.cl.ly/items/3F1o172Z1o0824021F2C/facebook.jpg') no-repeat; }
a.share-icon.twitter { background: #fff url('http://f.cl.ly/items/3C3I1B0g0o0V3V1Z3i2I/twitter.jpg') no-repeat; }
a.share-icon.email { background: #fff url('http://f.cl.ly/items/3E1e0o3a0s0I3G3r2X2T/email.jpg') no-repeat; }
Option 2 - put the images inside the links, then have them all display inline and use text-align:center
<div class="container">
<div class="row" style="border:1px solid red; text-align:center;">
<div class="span12">
<a href="" class="share-icon facebook" title="Share on facebook">
<img src="http://f.cl.ly/items/3F1o172Z1o0824021F2C/facebook.jpg" alt="" />
</a>
<a href="" class="share-icon twitter" title="Share on twitter">
<img src="http://f.cl.ly/items/3C3I1B0g0o0V3V1Z3i2I/twitter.jpg" alt="" />
</a>
<a href="" class="share-icon email" title="Share in an email">
<img src="http://f.cl.ly/items/3E1e0o3a0s0I3G3r2X2T/email.jpg" alt="" />
</a>
</div>
</div>
</div>
UPDATE: I apologize, I was not as clear as I should be, attached is the final result I want and I am trying to accomplish this in the 320px width view (mobile), thanks.