Hello FCC
I’m on my portfolio project and I’m very near to the completion. But I still have 2 problems I am struggling to find solutions to. I hope someone could enlighten me. (By the way, I did post the similar topic a few days ago but I coded my page from the scratch again because there were lots of unclosed tags with the previous one causing strange behaviour.)
Here is the link to my codepen.
Problem 1.
Putting images vertically middle.
In the portfolio section, I have 6 images and they are all within their own grid. I want them to be aligned vertically middle. I have tried vertical-align using CSS but it didn’t really move. Is there any specific elements or attributes I can use to put them where I want?
<div class="row" style="background-color: white">
<div class="col-md-4">
<img src="image address" class="img-responsive portfolio-image" alt="Website_1">
</div>
<div class="col-md-4">
<img src="image address" class="img-responsive portfolio-image" alt="Website_2">
</div>
<div class="col-md-4">
<img src="image address class="img-responsive portfolio-image" alt="Website_2">
</div>
</div>
.portfolio-image {
padding-top: 10px;
}
Problem 2.
At the bottom of the page, I have a form where visitors can write me an email. And my message textbox is supposed to be of 250px height. It is showing as 250px high in my local browser, but when it’s uploaded to the codepen, it becomes oneliner. Can’t really figure out why…
<form>
<input type="text" class="form-control" placeholder="Name" required><br>
<input type="text" class="form-control" placeholder="E-Mail Address" required><br>
<input type="text" class="form-control textarea" placeholder="Message" required><br>
<button type="button" class="btn btn-default">Submit</button>
</form>
.textarea {
height: 250px;
}
Oh! and the same codes all look different when 1) I open the file from my browser 2) when I upload it to the free hosting website. (CSS to the most outer portfolio div is not applied at all.) and 3) when I view from the codepen. Any possible reasons please?
I’m thoroughly enjoying the course and can’t thank enough for all the help I’m getting from the community. Hope to become good at it soon!