In my CSS, I have set a div to display:none, for when the page originally loads, and width set to 100%. However, on the page load, I also have a slickgrid getting generated, using that container. When I then set the div to display:block via jquery, I see that the slickgrid is not a width of 100%, but defaulting to 100px - when stepping through the slick grid code, I am seeing the following code returning 100, for my container which is set to display:none
$.css($container[0], "width", true)
Is there any way to get around what seems to be a default width for an element with display:none? I have tried setting the width in the same CSS block, with no luck.
.data-grid{
height: 350px;
display: none;
width: 100%;
}
TIA
display:noneshould not affect thewidth. You have something wrong elsewhere. - King Kingdisplay:nonefrom the CSS completely, my slickgrid is displaying correctly (with the width I expect), which is what leads me to believe that it's thedisplay:nonethat's causing the issue - user2699970