[personal profile] sireesanwar posting in [community profile] style_system
 Okay I've been working on Transmogrified as other themes I had some major frustrations with. I think I've figure most things out but suddenly I realized there is a horizontal scrollbar when there shouldn't be.


You can see it at [personal profile] sireesanwar . I can not figure out why my journal is like 150% wide. Anyone see what I'm not?

Date: 2025-04-15 11:42 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori
I was also deeply puzzled and threw this at a coding server I'm on to see if anyone else had ideas, and someone discovered that the problem seems to be that h2#subtitle has a width of 100% and then the absolute positioning on it causes it to inherit the width of the entire page because of the way positioning works. If you remove the width (or set it to something smaller) it seems to fix the issue!

Date: 2025-04-16 10:07 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

Oh - try adding #lj_controlstrip { box-sizing: border-box} (or, alternatively, #lj_controlstrip {width: calc(100%-2px);} but I think box-sizing is probably less confusing).

Date: 2025-04-16 10:51 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

Whoohoo! Yeah, width: 100% frequently behaves in confusing ways, unfortunately.

Date: 2025-04-17 11:42 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

Yeah - basically, with the default box model, the width and height properties don't include border/padding/margins - so it ends up being 100% + however much those are (in this case, 2px, because of the 1px border on each side), and that can end up being more than 100%. The box-sizing: border-box makes the width calculation include border/padding (though not margin).

Profile

Dreamwidth style system discussion

June 2025

S M T W T F S
12345 67
891011121314
15161718192021
22232425262728
2930     

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 7th, 2025 03:03 pm
Powered by Dreamwidth Studios