html - Whitespace added when browser is smaller than content -
html - Whitespace added when browser is smaller than content -
i have bizarre issue noticed i'm working on wordpress theme friend, , i'm using relative/absolute positions add together social/connect buttons on side of divs -- works fine proper design.
the issue, however, arises on "social" div on right side of page. if browser smaller main content's size, adds white-space right side of page. if move div left side, it's fine; adds whitespace @ half page length (which more confusing).
i can't life of me figure out why happening; can't figure out if it's standard behavior, or issue created on own.
i hoping perhaps here might have had similar experiences, or thought how prepare it.
the site reference http://betacreations.com/example/uberpotato
edit: css #social div is:
#social{ width: 90px; height: 250px; padding: 10px; position: absolute; right: -40px; top: 40px; background: #efefef; box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.3);}
the css #page-content div resides in is:
#page-content{ clear: both; min-height: 500px; width: 870px; margin: 0 auto; padding: 20px 0; position: relative; border: 5px solid #fff; background: #f2f0d7;}
and screenshot is:
the width there exists if browser's width less 960px (the width of content)
thanks in advance!
after viewing site, looks it's social pannel. of generated elements 100px or more wide. if remove width:90px;
, can see width it's trying achieve. wither amend elements , set widths smaller (or 100% or whatnot), or apply overflow: hidden;
#social
div:
#social { ... overflow:hidden; }
the reason why occurring because have overflow out of social container. happens on right because elements left aligned. (you align elements right suppose.)
hopefully helps.
html css relativelayout
Comments
Post a Comment