• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Collapsing space before content?

Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
The only immediate example I could pull is over at Slickdeals:

Slickdeals

When you start to shrink the browser window, the margins (space) collapse before the content does. Once the window reaches the content, then the content begins to collapse. Is there any way to do this without media queries?
 

Bo$$

Lab Extraordinaire
Joined
May 7, 2009
Messages
5,656 (1.03/day)
Location
London, UK
System Name Desktop | Server
Processor Intel i7 2700k @ 4.6GHZ | AMD 5350 @ 2500MHZ
Motherboard Asus P7Z77-V Pro | Asus AM1I-A
Cooling Corsair H60v2 | Stock Air
Memory Crucial Ballistix 2x8GB CL8 1600MHZ | Corsair Vengence 2x4GB CL9 1600MHZ
Video Card(s) EVGA GTX 1060 6GB | PNY GTX 750Ti
Storage Samsung 840 EVO 250GB + 4TB WD Red | 2x Seagate Barracuda 2TB
Display(s) Samsung S27D390H + Asus VE276Q | Headless
Case Fractal Design R5 | CM Elite 110
Audio Device(s) Asus Xonar D1 w/Otone Stilo 5.1 and Creative Fatal1ty headset
Power Supply EVGA Supernova 850 G2| Corsair CX430M
Mouse Razer Imperator 2012
Keyboard Corsair K90
Software Windows 7 SP1 X64 | Ubuntu 16.04LTS
oh i see what you mean, I think it has to do with the padding size
 
Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
So if this were padding, it would be padding at the level of the <html> element, wouldn't it? I've toyed with a couple of things as far as the <html> element is concerned, but I'll have to go back and toy some more I suppose. :)
 
Joined
Dec 27, 2008
Messages
587 (0.10/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
Fiddling with the html element didn't do anything.

I'm using these pages for reference since they're related:

CSS Tricks - Media Queries and Using Available Space

CSS Tricks - The Perfect Fluid Width Layout

As stated, I'd like to know if there exists a way to do this without media queries (and scripts). Since the content recognizes when the browser window is shrinking with just HTML/CSS, it seems to me it should be possible to have the content not shrink until the browser window comes "in contact" with it.
 
Top