Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Working on a Chrome extension using AngularJS

When extension button first clicked : <a href="https://postimg.org/image/86pqknw4h/">whenExtButtonIsClicked — Postimage.org</a>[<a href="https://postimg.org/image/86pqknw4h/" target="_blank" title="New Window">^</a>] 

Navigated to settings screen : <a href="https://postimg.org/image/j4wep3vc1/">settings — Postimage.org</a>[<a href="https://postimg.org/image/j4wep3vc1/" target="_blank" title="New Window">^</a>] 

[ISSUE] when navigated from settings back to home screen : <a href="https://postimg.org/image/hbti0sa5d/">backFromSettings — Postimage.org</a>[<a href="https://postimg.org/image/hbti0sa5d/" target="_blank" title="New Window">^</a>] 


How can I get the body to shrink to fit around just the card div? (Like the first image link)

What I have tried:

<pre lang="CSS">html {
 height:auto;
}

body {
 min-width:300px;
 background-color:#ff9900;
 height:auto;
}
.card {
 will-change: transform;
 margin: 10px;
 position: relative;
 border-radius: 2px;
 background-color: #fafafa;
 -webkit-transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
 transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
 box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
 border-radius: 10px;
 overflow:auto;
}
Posted
Comments
Nathan Minier 19-Jan-17 7:50am    
If you're properly replacing the innerHTML this should happen on it's own. An HTML element doesn't have a memory of previous contents, and unless you're absolutely setting your elements the flow should be re-rendered when the content is changed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900