Override height attribute and disable itMake a div fill the height of the remaining screen spaceCSS 100% height with padding/marginHow to disable text selection highlightingDisabled Buttons in CSS?How to make a div 100% height of the browser windowHow can I transition height: 0; to height: auto; using CSS?How to disable resizable property of textarea?permanent 2x3 CSS image galleryBehavior of attribute selectorCSS position:fixed is working for the header but not for the footer

A+ rating still unsecure by Google Chrome's opinion

Why are electric shavers specifically permitted under FAR §91.21

Why does Japan use the same type of AC power outlet as the US?

What is the question mark?

rule-based element selection from a matrix

Is the Microsoft recommendation to use C# properties applicable to game development?

If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?

Visa on arrival to exit airport in Russia

What is the opposite of "hunger level"?

How would armour (and combat) change if the fighter didn't need to actually wear it?

What is the fastest way to level past 95 in Diablo II?

Why do we use low resistance cables to minimize power losses?

Is Thieves' Cant a language?

A Magic Diamond

Why does auto deduce this variable as double and not float?

Doesn't the speed of light limit imply the same electron can be annihilated twice?

Build a mob of suspiciously happy lenny faces ( ͡° ͜ʖ ͡°)

Bringing Power Supplies on Plane?

How does the Moon's gravity affect Earth's oceans despite Earth's stronger gravitational pull?

What should I do if actually I found a serious flaw in someone's PhD thesis and an article derived from that PhD thesis?

What are these panels underneath the wing root of a A380?

Why don't modern jet engines use forced exhaust mixing?

Good way to stop electrolyte tabs from turning into powder?

What's a good pattern to calculate a variable only when it is used the first time?



Override height attribute and disable it


Make a div fill the height of the remaining screen spaceCSS 100% height with padding/marginHow to disable text selection highlightingDisabled Buttons in CSS?How to make a div 100% height of the browser windowHow can I transition height: 0; to height: auto; using CSS?How to disable resizable property of textarea?permanent 2x3 CSS image galleryBehavior of attribute selectorCSS position:fixed is working for the header but not for the footer






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have style that looks like this



.label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);



But it slightly breaks the markup in some places due to height attribute. If I disable height property (do it in browser) it displays label just fine.



I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute.



How to achieve that?










share|improve this question
























  • apply height: unset;. It sets the height back to it inherited value or if that is not available to the initial value.

    – Mark Baijens
    Mar 27 at 12:26







  • 1





    You mean you want to keep the height on .label-bold-pre-wrap, because that class is used in multiple places, you only want to disable/unset the height in a specific one? Then you start by finding something that makes your “certain case” discernible from all the other cases - like an ancestor with a certain class or of a certain type, so that you can use that to create a more specific selector.

    – 04FS
    Mar 27 at 12:30












  • an extra class or a specific selector matching only one of your labels could do . but your bit of CSS without your HTML structure won't help much. Can you clarify the question and show an example where you have that label where height should not be applied ?

    – G-Cyr
    Mar 27 at 12:31







  • 1





    well as a workaround I created the same style without height attribute but I wanted some better approach if any

    – lapots
    Mar 27 at 12:36


















1















I have style that looks like this



.label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);



But it slightly breaks the markup in some places due to height attribute. If I disable height property (do it in browser) it displays label just fine.



I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute.



How to achieve that?










share|improve this question
























  • apply height: unset;. It sets the height back to it inherited value or if that is not available to the initial value.

    – Mark Baijens
    Mar 27 at 12:26







  • 1





    You mean you want to keep the height on .label-bold-pre-wrap, because that class is used in multiple places, you only want to disable/unset the height in a specific one? Then you start by finding something that makes your “certain case” discernible from all the other cases - like an ancestor with a certain class or of a certain type, so that you can use that to create a more specific selector.

    – 04FS
    Mar 27 at 12:30












  • an extra class or a specific selector matching only one of your labels could do . but your bit of CSS without your HTML structure won't help much. Can you clarify the question and show an example where you have that label where height should not be applied ?

    – G-Cyr
    Mar 27 at 12:31







  • 1





    well as a workaround I created the same style without height attribute but I wanted some better approach if any

    – lapots
    Mar 27 at 12:36














1












1








1








I have style that looks like this



.label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);



But it slightly breaks the markup in some places due to height attribute. If I disable height property (do it in browser) it displays label just fine.



I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute.



How to achieve that?










share|improve this question














I have style that looks like this



.label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);



But it slightly breaks the markup in some places due to height attribute. If I disable height property (do it in browser) it displays label just fine.



I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute.



How to achieve that?







css






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 12:24









lapotslapots

4,12914 gold badges68 silver badges146 bronze badges




4,12914 gold badges68 silver badges146 bronze badges















  • apply height: unset;. It sets the height back to it inherited value or if that is not available to the initial value.

    – Mark Baijens
    Mar 27 at 12:26







  • 1





    You mean you want to keep the height on .label-bold-pre-wrap, because that class is used in multiple places, you only want to disable/unset the height in a specific one? Then you start by finding something that makes your “certain case” discernible from all the other cases - like an ancestor with a certain class or of a certain type, so that you can use that to create a more specific selector.

    – 04FS
    Mar 27 at 12:30












  • an extra class or a specific selector matching only one of your labels could do . but your bit of CSS without your HTML structure won't help much. Can you clarify the question and show an example where you have that label where height should not be applied ?

    – G-Cyr
    Mar 27 at 12:31







  • 1





    well as a workaround I created the same style without height attribute but I wanted some better approach if any

    – lapots
    Mar 27 at 12:36


















  • apply height: unset;. It sets the height back to it inherited value or if that is not available to the initial value.

    – Mark Baijens
    Mar 27 at 12:26







  • 1





    You mean you want to keep the height on .label-bold-pre-wrap, because that class is used in multiple places, you only want to disable/unset the height in a specific one? Then you start by finding something that makes your “certain case” discernible from all the other cases - like an ancestor with a certain class or of a certain type, so that you can use that to create a more specific selector.

    – 04FS
    Mar 27 at 12:30












  • an extra class or a specific selector matching only one of your labels could do . but your bit of CSS without your HTML structure won't help much. Can you clarify the question and show an example where you have that label where height should not be applied ?

    – G-Cyr
    Mar 27 at 12:31







  • 1





    well as a workaround I created the same style without height attribute but I wanted some better approach if any

    – lapots
    Mar 27 at 12:36

















apply height: unset;. It sets the height back to it inherited value or if that is not available to the initial value.

– Mark Baijens
Mar 27 at 12:26






apply height: unset;. It sets the height back to it inherited value or if that is not available to the initial value.

– Mark Baijens
Mar 27 at 12:26





1




1





You mean you want to keep the height on .label-bold-pre-wrap, because that class is used in multiple places, you only want to disable/unset the height in a specific one? Then you start by finding something that makes your “certain case” discernible from all the other cases - like an ancestor with a certain class or of a certain type, so that you can use that to create a more specific selector.

– 04FS
Mar 27 at 12:30






You mean you want to keep the height on .label-bold-pre-wrap, because that class is used in multiple places, you only want to disable/unset the height in a specific one? Then you start by finding something that makes your “certain case” discernible from all the other cases - like an ancestor with a certain class or of a certain type, so that you can use that to create a more specific selector.

– 04FS
Mar 27 at 12:30














an extra class or a specific selector matching only one of your labels could do . but your bit of CSS without your HTML structure won't help much. Can you clarify the question and show an example where you have that label where height should not be applied ?

– G-Cyr
Mar 27 at 12:31






an extra class or a specific selector matching only one of your labels could do . but your bit of CSS without your HTML structure won't help much. Can you clarify the question and show an example where you have that label where height should not be applied ?

– G-Cyr
Mar 27 at 12:31





1




1





well as a workaround I created the same style without height attribute but I wanted some better approach if any

– lapots
Mar 27 at 12:36






well as a workaround I created the same style without height attribute but I wanted some better approach if any

– lapots
Mar 27 at 12:36













2 Answers
2






active

oldest

votes


















3














your css code



 .label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);

.other
height:auto;



your html code



<div class="label-bold-pre-wrap">hloo</div>
<div class="label-bold-pre-wrap other">hloo</div>





share|improve this answer

























  • Oh! Indeed it works with this

    – lapots
    Mar 27 at 12:45











  • yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

    – kartik radadiya
    Mar 27 at 12:49



















2














Please try Height: auto; or height: initial;. It will overwrite your height: 20px






share|improve this answer

























  • i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

    – G-Cyr
    Mar 27 at 12:33












  • Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

    – Joykal Infotech
    Mar 27 at 12:38













Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377142%2foverride-height-attribute-and-disable-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














your css code



 .label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);

.other
height:auto;



your html code



<div class="label-bold-pre-wrap">hloo</div>
<div class="label-bold-pre-wrap other">hloo</div>





share|improve this answer

























  • Oh! Indeed it works with this

    – lapots
    Mar 27 at 12:45











  • yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

    – kartik radadiya
    Mar 27 at 12:49
















3














your css code



 .label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);

.other
height:auto;



your html code



<div class="label-bold-pre-wrap">hloo</div>
<div class="label-bold-pre-wrap other">hloo</div>





share|improve this answer

























  • Oh! Indeed it works with this

    – lapots
    Mar 27 at 12:45











  • yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

    – kartik radadiya
    Mar 27 at 12:49














3












3








3







your css code



 .label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);

.other
height:auto;



your html code



<div class="label-bold-pre-wrap">hloo</div>
<div class="label-bold-pre-wrap other">hloo</div>





share|improve this answer













your css code



 .label-bold-pre-wrap 
font-weight: bold !important;
white-space: pre-wrap !important;
height: 20px;
font-size: 10px;
border-color: #c2c3c4;
background: transparent repeat-x;
background-image: url(../reindeer/table/img/header-bg-light.png);

.other
height:auto;



your html code



<div class="label-bold-pre-wrap">hloo</div>
<div class="label-bold-pre-wrap other">hloo</div>






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 12:36









kartik radadiyakartik radadiya

1347 bronze badges




1347 bronze badges















  • Oh! Indeed it works with this

    – lapots
    Mar 27 at 12:45











  • yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

    – kartik radadiya
    Mar 27 at 12:49


















  • Oh! Indeed it works with this

    – lapots
    Mar 27 at 12:45











  • yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

    – kartik radadiya
    Mar 27 at 12:49

















Oh! Indeed it works with this

– lapots
Mar 27 at 12:45





Oh! Indeed it works with this

– lapots
Mar 27 at 12:45













yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

– kartik radadiya
Mar 27 at 12:49






yes it will work's because label-bold-pre-wrap is just set height and 'other' will change fix height to auto . if we set !important to label-bold-pre-wrap then other will not work

– kartik radadiya
Mar 27 at 12:49














2














Please try Height: auto; or height: initial;. It will overwrite your height: 20px






share|improve this answer

























  • i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

    – G-Cyr
    Mar 27 at 12:33












  • Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

    – Joykal Infotech
    Mar 27 at 12:38















2














Please try Height: auto; or height: initial;. It will overwrite your height: 20px






share|improve this answer

























  • i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

    – G-Cyr
    Mar 27 at 12:33












  • Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

    – Joykal Infotech
    Mar 27 at 12:38













2












2








2







Please try Height: auto; or height: initial;. It will overwrite your height: 20px






share|improve this answer













Please try Height: auto; or height: initial;. It will overwrite your height: 20px







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 12:27









Joykal InfotechJoykal Infotech

1,6163 gold badges5 silver badges17 bronze badges




1,6163 gold badges5 silver badges17 bronze badges















  • i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

    – G-Cyr
    Mar 27 at 12:33












  • Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

    – Joykal Infotech
    Mar 27 at 12:38

















  • i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

    – G-Cyr
    Mar 27 at 12:33












  • Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

    – Joykal Infotech
    Mar 27 at 12:38
















i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

– G-Cyr
Mar 27 at 12:33






i do not believe this answers the question But it slightly breaks the markup in some places ..... I need this style in other places, where it doesn't break anything. But in my certain case I need basically the same style, but without height attribute. the op needs to reset height for some element, not all of them :(

– G-Cyr
Mar 27 at 12:33














Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

– Joykal Infotech
Mar 27 at 12:38





Just use 'label-bold-pre-wrap' class where need the same CSS and overwrite the height property with the unique selector.

– Joykal Infotech
Mar 27 at 12:38

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377142%2foverride-height-attribute-and-disable-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해