Solved

(URGENT) Help HTML and CSS Resizing Images

Posted on 2016-11-21
2
20 Views
Last Modified: 2016-11-21
Hi all,

Having a problem resizing my images through CSS and can't seem to work out why.

Anyone have any idea how to fix this Problem ????

If anyone can help ASAP as I have an assignment deadline at uni tomorrow evening thanks.

As you can see in my code I have set the width and height of the images however they seem to only recognise the width and not height.

Here is an example of how it comes out.

Screen-Shot-2016-11-21-at-13.03.35.png Screen-Shot-2016-11-21-at-13.03.45.png Screen-Shot-2016-11-21-at-13.03.52.png

HTML
 <div class="iphonefeature"><img src="Assets/Asset21.png"></div>
          
        <!-- END FEATURES SECTION -->
          
          <div id="clear"></div>
       
        <!-- START DOWNLOAD SECTION -->
          
          <div id="downloadsection">
          <div id="downloadtext">
          <h1>Download the app Today!</h1>
          <div class="button3">TRY APP</div>
          <div class="button4">BUY APP</div>
          </div>
          </div>
           
          
          <!-- END DOWNLOAD SECTION -->
          
          <!-- START FOOTER SECTION -->
          <div id="footer">
          
          <h1>More Apps By Inspiro Media</h1>
          
          <div class="iapp"><img src="Assets/Asset13.png"></div>
          <div class="iapp"><img src="Assets/Asset14.png"></div>
          <div class="iapp"><img src="Assets/Asset15.png"></div>
           
              
          <p>Copywrite 2016 @ Inspiro Media Ltd.</p>
          <div class="bottomimg"><img src="Assets/Asset16.png"></div>
          <a href="#">Contact</a>
          <a href="#">Support</a>
          <div class="bottomimg"><img src="Assets/Asset17.png"></div>  
    
          </div>
          
          
          <!-- END FOOTER SECTION -->
          
          
          <!-- End Container --> 
          
   
    </body>   
    
</html>

Open in new window


CSS

.iphonefeature img {
    
    float: left; 
    width: 20px; 
    height: 20px;
    
}

/* END FEATURES */


/* START DOWNLOAD SECTION */

#downloadsection {
    background-color: #0C2633;
    height: 300px; 
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#downloadsection h1{
    margin: top: 50px;  
    text-align: center;
    margin-bottom: 35px;
    color: #1da6c4; 
    font-size: 40px; 
    text-transform: uppercase;
    font-family: 'Ek Mukta', sans-serif;
    
}

#downloadtext {
      
    width: 52%;
    display: block; 
    margin: 0 auto; 
    font-family: 'Ek Mukta', sans-serif;
    

}

.button3 {
    width:310px;
    float: left;
    padding: 10px 30px;  
    border-radius: 10px; 
    background-color: #1fb18a;
    height: 30px; 
    text-align: center; 
/*
    margin-right: 0px;
    width: 40%;
*/
    color: white;
    font-weight: bold;
    font-size: 20px;
}


.button4 {
    
    float: right; 
    width:310px;
    padding: 10px 30px;  
    border-radius: 10px; 
    background-color: #1DA6C4;
    height: 30px; 
    text-align: center; 
/*
    margin-left: 350px;
    width: 40%;
*/
    color: white;
    font-weight: bold;
    font-size: 20px;
}

/* END DOWNLOAD SECTION */

/* START FOOTER SECTION */

#footer { 

    height: 500px; 
    width: 1250;

}

.iapp img {
    
    width: 100px; 
    height: 100px; 
    display: inline; 
    
    
}

.iapp h1 {
    
    font-size: 30px; 
    text-align: center:
    
}


.bottomimg {
    
 width: 100px;
 height: 100px; 
    
}
/* END FOOTER SECTION */ 

Open in new window

0
Comment
Question by:Mike Moore
2 Comments
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41895867
You should set either the width or the height - otherwise you are going to distort your images if they are not in the same proportion as the width and height you specify.
You can use max-width and max-height if you want to limit both so try changing your width / height to max-width / max-height.
0
 

Author Closing Comment

by:Mike Moore
ID: 41895880
Perfect Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now