@grantson - one way to do it, not necessarily the only way, and someone might come up with a better way, is to define a class like this:
.socialIcons {
display:inline-block;
}
And att class="socialIcons"
on each of the divs that contains your icon and anchor tag. Also, close each div right after the anchor tag - don't nest them.
grantson sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2492 | @khaduch |http://www.freecodecamp.com/khaduch
display: inline-block;
- I changed it in the browser tools, not in my codepen... Please note that!
grantson sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: grantson already gave khaduch points
@grantson - I closed my copy of the pen with it in - but you want to have your divs structured like this:
<div class="socialIcon">
<a whatever the link and icon is></a>
</div>
I made that change before I added the class with the display: inline-block;
- and deleted all of what would then be extraneous </div>
tags afterward.
grantson sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: grantson already gave khaduch points
Hello. I have been banging my head against the wall because of a problem that seems simple enough but I can’t solve it. I am trying to build an image masonry-like gallery on a Bootstrap based webpage and have gotten all the grid issues and effects in order but the text overlay positioning on the image is still messed up and I can’t fix it. What I feel the main problem is is that the <p> element is taking on the height of the div it is contained in and this is preventing styles like text-align: centre; and align-items: centre; from applying (container has flex: direction; applied). I would be massively grateful if someone can help on this. I have literally spent hours trying to fix it but can’t even understand where the problem lies. Code snippets below (some of it is just to create the grid layout but including here just to help replicate the problem).
HTML:
<div class="row no-gutter" id="tiles">
<div class="col-lg-4 col-md-6 mx-auto">
<a class="link-box" href="#">
<div class="img-wrapper">
<img class="img-thumbnail" src="https://c1.staticflickr.com/1/736/31933254544_3e0162f282_o.jpg" alt="Card image cap">
<div class="img-text">
<p>Placeholder 1</p>
</div>
</div>
</a>
</div>
</div>
CSS:
.no-gutter .img-thumbnail {
padding: 0;
border-radius: 0;
min-width: 100%;
display: flex;
}
.row.no-gutter {
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
.row.no-gutter > [class*="col-"],
.row.no-gutter > [class^="col-"] {
padding: 0;
margin: 0;
}
.img-wrapper {
width: 100%;
height: 250px;
overflow: hidden;
background-color: #000;
position: relative;
}
.img-wrapper img {
display: block;
float: left;
width: 100%;
opacity: 1;
-webkit-transition: opacity 0.35s;
}
.img-wrapper:hover img {
opacity: 0.4;
filter: alpha(opacity=40);
}
.img-wrapper .img-text {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
text-align: center;
display: flex;
}
.img-wrapper a {
display: block;
}
.img-text p {
position: relative;
margin: 0;
color: white;
font-size: 1.8em;
align-items: center;
}
5 % 2
= 120 % 7
= 6var remainder
equal to the remainder of 11 divided by 3
/
if you want their remainder instead, use %
in place of the /
zhann1982 sends brownie points to @taltmann42 :sparkles: :thumbsup: :sparkles:
:cookie: 527 | @taltmann42 |http://www.freecodecamp.com/taltmann42
yuchiu sends brownie points to @jtan3 and @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 311 | @jtan3 |http://www.freecodecamp.com/jtan3
:cookie: 237 | @skycoder01 |http://www.freecodecamp.com/skycoder01
console.log(formattedData ," formattedData");
$.each(formattedData, function(key, value){
if (value.yaxisValue === "" || value.yaxisValue === null){
delete formattedData[key];
}
});
console.log(formattedData ," formattedData");
.img-wrapper .img-text {
width: 100%;
height: 100%;
c0d0er sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 781 | @alpox |http://www.freecodecamp.com/alpox
ul
element has some margin-bottom
of which you have to get rid of
ellenkorbes sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 782 | @alpox |http://www.freecodecamp.com/alpox
button
tags on your page. Also a width: 100%
. This is what messes your button up.navbar-light
on the nav
element, which makes the button appear.
.contact input, textarea, select, button {
width : 100%;
margin: 0;
}
.contact input,
.contact textarea,
.contact select,
.contact button {
width : 100%;
margin: 0;
}
```
<some code>
```
Hack the planet!
In the above case to specify the highlighting i used:
```css
<some code>
```
like this
:warning: ellenkorbes already gave alpox points
ellenkorbes sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
.nav
and .nav ul
styles except the background-color
for .nav
nav-link
to the a
elements in the navigation list
justify-content-end
to the div
which surrounds the ul
. Then remove the mr-auto
from the ul
.
ellenkorbes sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 783 | @alpox |http://www.freecodecamp.com/alpox
transform: scale
. Any idea how to solve that? The radius is there at the beginning and the end but not during the transition
blackioo sends brownie points to @alpox and @oppiniated :sparkles: :thumbsup: :sparkles:
:cookie: 579 | @oppiniated |http://www.freecodecamp.com/oppiniated
:cookie: 784 | @alpox |http://www.freecodecamp.com/alpox
transform: scale
and border-radius
<div class="row">
<div class="col-md-2">
<a href="https://www.facebook.com/mers.vaneo" role="button" class="btn btn-reddit btn-large">
<i class="fa fa-facebook-square" aria-hidden="true">
Facebook
</i>
</a>
</div>
</div>
niprobin sends brownie points to @oppiniated and @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 785 | @alpox |http://www.freecodecamp.com/alpox
:cookie: 580 | @oppiniated |http://www.freecodecamp.com/oppiniated
<div class="row">
<div class="col-md-2">
<a href="https://www.facebook.com/mers.vaneo" role="button" class="btn btn-facebook btn-large">
<i class="fa fa-facebook-square" aria-hidden="true">
Facebook
</i>
</a>
</div>
</div>
eyej sends brownie points to @marianissimus :sparkles: :thumbsup: :sparkles:
:cookie: 351 | @marianissimus |http://www.freecodecamp.com/marianissimus
.navbar-nav > li > a {
text-align: right;
}
mr-auto
class on ul
and #mainNavigation {
justify-content: flex-end;
}
@Marianissimus <div class="container fluid"
<h1 class="text-centre">Dr.Norman</h2>
<h2 class="text-centre">The man who saved a billion lives</h2>
z-index
to work div should also have position: relative
or position: absolute
zeddmacharia sends brownie points to @marianissimus :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @marianissimus |http://www.freecodecamp.com/marianissimus
.solution li {
list-style-position: inside;
}
zeddmacharia sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1805 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
eyej sends brownie points to @veredrec :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @veredrec |http://www.freecodecamp.com/veredrec
@kirbyedy that didn't work. It's like this, so far.
mattlong87 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1807 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
skybreak48 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1808 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
$("#newquote").on("click", getQuote);
works but $("#newquote").on("click", getQuote());
doesn't?
img-fluid
bootstrap class will do it
isaaknazar sends brownie points to @mattlong87 :sparkles: :thumbsup: :sparkles:
:cookie: 269 | @mattlong87 |http://www.freecodecamp.com/mattlong87
skybreak48 sends brownie points to @mattlong87 :sparkles: :thumbsup: :sparkles:
scharom16 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1812 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
timer = setInterval(function() {countDown(time)}, delay);
aenila sends brownie points to @cryder9898 :sparkles: :thumbsup: :sparkles:
:cookie: 301 | @cryder9898 |http://www.freecodecamp.com/cryder9898
Hello! I am working on my portfolio project and I am having an issue. Here is my project: http://codepen.io/toriancrane/pen/jyJJGR
The issue that I am having is that, under the Contact section where my social media icons are, whenever I try to turn those images into links, it warps that section of the page from looking like this https://gyazo.com/efc12a3aca76a8ecfd6d058e01bd87b9
to looking like this https://gyazo.com/217554347aebaef5c29efb070a4720b6
Does anyone know why this is happening?
toriancrane sends brownie points to @hashris :sparkles: :thumbsup: :sparkles:
:cookie: 84 | @hashris |http://www.freecodecamp.com/hashris
rasty42 sends brownie points to @toriancrane :sparkles: :thumbsup: :sparkles:
:cookie: 255 | @toriancrane |http://www.freecodecamp.com/toriancrane
<button type="button" class="btn btn-link">
<href url: "facebook.com">Facebook</a></button>
<h1>Webpage Design:</h1>
<h4>Showcasing What I Have Learned in FreeCodeCamp</h4>
anyone know why the link isnt going to facebook?
zackrich12 sends brownie points to @arashdai :sparkles: :thumbsup: :sparkles:
:cookie: 155 | @arashdai |http://www.freecodecamp.com/arashdai
<button type="button" class="btn btn-link">
<a href = "http://facebook.com">Facebook</a></button>
<h1>Webpage Design:</h1>
<h4>Showcasing What I Have Learned in FreeCodeCamp</h4>
<a href = "http://facebook.com">Facebook
<button type="button" class="btn btn-link">
</button>
</a>
rld2121 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 2704 | @moigithub |http://www.freecodecamp.com/moigithub
@ZackRich12
<a class="btn btn-link" href="https://www.facebook.com" target="_blank">Facebook</a>
<button> is for submitting information.
<a> is for navigating to another location.
You can't have one wrapping the other.
<a href="https://facebook.com"><button>Visit Page Now</button></a>
I finally figured it out, thanks thouhg! @SkyCoder01
zackrich12 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 238 | @skycoder01 |http://www.freecodecamp.com/skycoder01