# Help with my portfolio page

**URL:** <https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473>\
**Category:** I Built This\
**Created:** [June 19, 2016, 3:28pm UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473 "2016-06-19T15:28:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattsatonacat](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mattsatonacat](https://forum.freecodecamp.org/u/mattsatonacat)\
**Post date:** [June 19, 2016, 3:28pm UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/1 "2016-06-19T15:28:45Z")

</div>

HI everyone, I’ve just started putting together my portfolio page…and I’m stuck quite early on.

I’m using the jumbotron bootstrap class. How do I make the background image full size? I’ve tried cover but think that just sets the width. I can increase the height by manually entering the number of pixels…but is there a way to automatically set the height to the full height of the background image?

code is here [http://codepen.io/mattsatonacat/pen/NrRvQv](http://codepen.io/mattsatonacat/pen/NrRvQv)

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [June 19, 2016, 4:52pm UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/2 "2016-06-19T16:52:50Z")

</div>

I can’t give your code a thorough look over since I’m on mobile, but it sounds like you’ll want to use `fill` instead of `cover`. The issue is probably that your image is a different aspect ratio from the container you’re trying to put it in. Using `fill` will make sure your background is fully covered by the image but will also crop out some of it. It’s possible to force the background image to always be the same size as the container, but it’s going to look stretched and warped.

---

<div class="post-metadata">

**Author:** ![sleeplessclassics](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sleeplessclassics](https://forum.freecodecamp.org/u/sleeplessclassics)\
**Post date:** [June 19, 2016, 5:20pm UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/3 "2016-06-19T17:20:23Z")

</div>

Hey,  
I am not so sure what the problem is but if you are trying to get a background image you can do the following in your body tag:

add background attribute to your body tag like \< body background = 'bgimage.jpg"\>

Link: [http://www.w3schools.com/tags/att\_body\_background.asp](http://www.w3schools.com/tags/att_body_background.asp)

Hope this helps and remember Read-Search-Ask

Cheers,  
Ashish

---

<div class="post-metadata">

**Author:** ![genestd](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@genestd](https://forum.freecodecamp.org/u/genestd)\
**Post date:** [June 20, 2016, 1:45am UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/4 "2016-06-20T01:45:06Z")

</div>

Try the following CSS:  
/\* For Static Background Image\*/  
background: url("…/laptop-4.jpg") no-repeat center center;  
-webkit-background-size: cover;  
-moz-background-size: cover;  
-o-background-size: cover;  
background-size: cover;

The WebKit/moz stuff is for backward compatibility.

---

<div class="post-metadata">

**Author:** ![GregatGit](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gregatgit/32/9838_2.png) [@GregatGit](https://forum.freecodecamp.org/u/GregatGit)\
**Post date:** [June 20, 2016, 5:13am UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/5 "2016-06-20T05:13:37Z")

</div>

This is a really good start.  
You have to add bootstrap.js to the javascript in settings for bootstrap to work properly.  
If you go to this page you can see how to get a hamburger style menu working - [http://www.w3schools.com/bootstrap/bootstrap\_scrollspy.asp](http://www.w3schools.com/bootstrap/bootstrap_scrollspy.asp)  
Keep going!

---

<div class="post-metadata">

**Author:** ![mattsatonacat](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mattsatonacat](https://forum.freecodecamp.org/u/mattsatonacat)\
**Post date:** [June 22, 2016, 8:19pm UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/6 "2016-06-22T20:19:33Z")

</div>

Hi everyone, thanks for all the comments! I think I fixed the background image problem. And GregatGit thanks for the tips on bootstrap. I’ve just posted a link to the page again on another thread as I’ve got it to a point I’m reasonably happy with it. Need to work on how responsive it is as when I load it on my phone it looks pretty horrendous!!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:11pm UTC](https://forum.freecodecamp.org/t/help-with-my-portfolio-page/12473/7 "2021-06-01T18:11:40Z")

</div>

Closed on June 1, 2021, 6:11pm UTC


