FIND YOUR NEXT FEW LINES

Results for “Box dimensions & overflow”

Small, practical examples. Search by task or narrow things down below.

65 snippets foundClear filters
CSSResponsive conditions & sizing

Adapt a layout to viewport orientation

CSS: The orientation query compares viewport dimensions rather than detecting a physical device type.

CSS✓ Tested
HTMLImages & embedded documents

Allow embedded scripts without granting same-origin access

HTML: Grant only allow-scripts so the sandboxed document retains an opaque origin.

HTML✓ Tested
Arduino / CData & storage

Average a fixed set of readings

Accumulate sample values without overflowing a 16-bit total.

array✓ Tested
CSmall algorithms & bit operations

Calculate a least common multiple using a GCD

C: Divide before multiplying to reduce the risk of intermediate overflow.

C✓ Tested
C++Numeric parsing & calculations

Calculate a two-dimensional vector length

C++: hypot avoids unnecessary intermediate overflow in the sum of squares.

C++✓ Tested
JavaPrecise numeric calculations

Calculate beyond the long integer range

Java: Use BigInteger when a fixed-width primitive type would overflow.

Java✓ Tested
CNumeric parsing & arithmetic

Compute a two-dimensional vector length

C: hypot avoids unnecessary intermediate overflow compared with squaring both inputs directly.

C✓ Tested
CSSVisual treatment & accessibility

Control the size of a repeated background tile

CSS: Background-size sets the rendered dimensions of each repeated background image.

CSS✓ Tested
CSSPositioning & stacking

Keep a tall section inside a local vertical scroller

CSS: A bounded height and overflow auto keep long content from stretching the surrounding page.

CSS✓ Tested
CSSResponsive design

Preserve an aspect ratio

Reserve a 16:9 CSS box without a fixed height.

CSS✓ Tested
jQueryTraversal & selection

Read checked options

Collect checked checkbox values with jQuery map and get.

jQuery✓ Tested
jQueryAnimation completion

Reveal a collapsed panel with a slide

jQuery: slideDown animates the panel’s vertical dimensions.

jQuery✓ Tested