- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am using skeleton framework to do css, i give height:auto!important to a div now when i resize the screen to mobile view it takes same height..is there any way to change the height …..i change the height in media query too but it takes the same height..
height with !important has always more weight than the other one, that may be the problem , why you use ** !important** ?
its ie6 and ie7 hack
div{ min-height:275px; height:auto!important; height:275px; }
i don’t know the usage of !important
**min-height:275px** and **height:auto** is enough,**height:275px** is unneccasary i think
Why are you trying to hack IE6 & 7 for a mobile view? It won’t be found on any mobile device.
> i don’t know the usage of !important
It’s called the bang hack. It relies on the inability for Internet Explorer 6 to understand `!important`. Basically, you set whatever you like with the hammerbash flag, then you override it with whatever you like for IE6 only.
So in our case:
.my-element {
height: auto !important;
height: 275px;
}
… results in `height: auto` for everyone except for IE6 which will apply `height: 275px`.
Problem with this hack is it may involve some specificity problems.
Perfect example why any type of hacks should be avoided as much as possible.