Skip to content

Position Absolute and Setting Height and Width #3

@1-0-1

Description

@1-0-1

If the container divs are being set with position: absolute, why does the width and height need to be set? What would be the effect of setting right and bottom and allowing the grid to resize automatically to the container?

$container_0 = $("<div class='container_0'></div>").css("overflow", "hidden")
    .css("outline", 0).css("position", "absolute")
    .css("width", outerContainerWidth)
    .css("height", "auto")
    .css("left", 0)
    .css("top", 0)
    .css("right", 0)
    .css("bottom", 0)
    .addClass(uid).addClass("ui-widget")
    .appendTo($outerContainer);
$container_1 = $("<div class='container_1'></div>").css("overflow", "hidden")
    .css("outline", 0).css("position", "absolute")
    .css("width", "auto")
    .css("height", "auto")
    .css("left", totalWidthOfFrozenColumns)
    .css("top", 0)
    .css("right", 0)
    .css("bottom", 0)
    .addClass(uid).addClass("ui-widget")
    .appendTo($outerContainer);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions