Title: Fixed height possible?
Last modified: August 21, 2016

---

# Fixed height possible?

 *  Resolved [slatbh](https://wordpress.org/support/users/slatbh/)
 * (@slatbh)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/fixed-height-possible/)
 * I’m trying to use the slider in a responsive theme to display images in the header.
 * I would like the images to maintain their height with a varying width. I’ve tried
   using
 * > .metaslider .nivo-main-image, .metaslider .nivo-slice, .metaslider img{
   >  height:
   > 250px; }
 * in CSS to set the height. It works until the image changes, but then I see that
   height has gone back to ‘auto’ when using the element inspector in Safari. I 
   assume that this is happening in the javascript of the plugin (i.e. recalculation).
 * Is there any way to overide this? I suspect not but would like confirmation.
 * Thanks in advance
 * [http://wordpress.org/extend/plugins/ml-slider/](http://wordpress.org/extend/plugins/ml-slider/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/fixed-height-possible/#post-3855255)
 * Hi,
 * I also suspect not, I don’t think it’s a good idea to try setting heights with
   responsively scaled images.
 * If you put an !important after your CSS rule it should override the styles that
   nivoslider applies to the elements automatically, but I suspect it would break
   it – worth a try though.
 * Regards,
    Tom.
 *  Thread Starter [slatbh](https://wordpress.org/support/users/slatbh/)
 * (@slatbh)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/fixed-height-possible/#post-3855304)
 * Hi Tom
 * Thanks for your reply, I was too busy to answer yesterday.
 * I managed to achieve what I wanted by doing 2 things. First, was your suggestion
   of adding the !important to my CSS height above and add a minimum width.
 * > .metaslider .nivo-main-image, .metaslider .nivo-slice, .metaslider img{
   >  height:
   > 250px !important; min-width:1200px; }
 * The other thing I needed to do was set the enclosing <div> for your slider to
   be:
 * > #sliderholder{
   >  width: 100%; overflow:hidden; }
 * Thanks for your help and I copy my solution here to help others
 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/fixed-height-possible/#post-3855332)
 * Hi Siatbh,
 * Great to hear you got it sorted, and thanks for posting the solution!
 * Regards,
    Tom
 *  [smit_ralph](https://wordpress.org/support/users/smit_ralph/)
 * (@smit_ralph)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/fixed-height-possible/#post-3855394)
 * That worked for me as well, thx!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Fixed height possible?’ is closed to new replies.

 * ![](https://ps.w.org/ml-slider/assets/icon.svg?rev=3568997)
 * [Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider](https://wordpress.org/plugins/ml-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ml-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ml-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/ml-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ml-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ml-slider/reviews/)

## Tags

 * [fixed](https://wordpress.org/support/topic-tag/fixed/)
 * [height](https://wordpress.org/support/topic-tag/height/)

 * 4 replies
 * 3 participants
 * Last reply from: [smit_ralph](https://wordpress.org/support/users/smit_ralph/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/fixed-height-possible/#post-3855394)
 * Status: resolved