0

I am building a website based on a template. It uses bootstrap and can be seen here http://www.tombelina.com/fcrusade/

I am trying to get the first image to take up the whole screen on a mobile device screen. Currently it works perfectly for desktops but I can not get it to work with mobile devices.

Tom Hanson
  • 873
  • 10
  • 39

4 Answers4

0

Use the @media in CSS. Here is an example:

 @media screen and (max-device-width: 480px) {
   img.classname {
     float: left;
     width: 200px;
   }
 }

just change classname to any class and give it to the image.

--OR--

you can use this:

body {
    background: url('http://www.flywavez.com/images/sexy-girl-listening.jpg') no-repeat fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

ref: CSS to make images resize and fit any screen the same

InvincibleM
  • 519
  • 2
  • 12
0

I guess in your site, you should add some color to the background (Black would be suited i believe). And as for the image you should try this css code:

    [Image]{
height: 100vh; //which means the image will have the height of the screen. NOTE: Of the SCREEN and not the WEBPAGE.
}

You can do this and get the size of the image as of the screen.

0

You have to use @media

`@media (max-width: 767px){
   header .header-content{
      height: 550px;
   }
 }`

Your site will look like this

George
  • 195
  • 1
  • 5
0

I think it's because your gametracker image is so wide that it's jacking up the layout. It's wider than 100% of the page. Add the "img-responsive" class to that image - @aquinas

Tom Hanson
  • 873
  • 10
  • 39