hguser
hguser

Reputation: 36028

how to remove some css attributes defined by bootstrap

I am using bootstrap,however I found some problems if I want to delete some css styles defined by bootstrap.

For example,there is a style by bootstrap:

img{
    max-height:100%;    
}

Now,how about if I want to remove this attribute?

I have tried this:

img{
    max-height:"";
}

It seems that this does not work.

So I use javascript instead:

$("img").each(function(){
    $(this).css("maxWidth","");
});

Any other good idea?

Upvotes: 0

Views: 798

Answers (3)

Andy Ray
Andy Ray

Reputation: 32066

max height's default value is none, not empty quotes.

Upvotes: 0

MikeM
MikeM

Reputation: 27405

use max-height:none (the initial value for max-height) and make sure this is declared below the bootstrap css file.

img{
    max-height:none;
}

Upvotes: 3

iheanyi
iheanyi

Reputation: 424

Check to make sure you are modifying the correct .css file, you could be modifying the incorrect one. Bootstrap has multiple CSS files, if I recall correctly.

Upvotes: 0

Related Questions