radicaloptimism

Split Profile Card Layout (PFP on Left ver.)

Jul 19th, 2025 (edited)
3,620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.77 KB | None | 0 0
  1. <!-- credit @tigerdropped if used <3 + you can share the layout link so more people can benefit of it. -->
  2. <article class="mainbox">
  3.   <h1>I'm a title!</h1>
  4.  <div class="textbox">
  5.    <p>You can type stuff here! just not too much, it will look bad after a certain amount of text. Except on mobile/tablets.</p>
  6.  </div>
  7. </article>
  8. <article class="restofprofile">
  9.  <!-- ALL YOUR NEW HTML HAS TO GO HERE SO IT APPEARS UNDER YOUR SPLIT PROFILE -->
  10.  Lorem Ipsum and yapathon blah.
  11. </article>
  12.  
  13. <style>
  14.  
  15. /* UPDATED 19/06/2026: Switched to the new site labels. Fixed user info placement. Adjusted comment descriptions to be less obtuse. */
  16.  
  17. /* BORDERS FOR GRID CELL VISIBILITY, REMOVE IF YOU NEED TO */
  18. .pp-uc-avatar-container,
  19. .profile-info-stack-inner,
  20. .pp-uc-about-me + div,
  21. .mainbox,
  22. .restofprofile {
  23.  border: 1px solid #f9f9f980;
  24.  border-radius: 4px;
  25. }
  26.  
  27. /* Global font. OVERRIDES EVERYTHING. Remove if you need to. */
  28. :is(#root, #root ~ .chakra-portal) *,
  29. :is(#root, #root ~ .chakra-portal) *::placeholder,
  30. :is(#root, #root ~ .chakra-portal) *::before,
  31. :is(#root, #root ~ .chakra-portal) *::after
  32. { font-family: 'DM Sans', sans-serif; }
  33.  
  34. /* Background of page */
  35. #root > * { background: #111 !important; }
  36.  
  37. /* Setup */
  38. .pp-uc-about-me, .profile-info-hstack { display: contents; }
  39.  
  40. /* Main container of profile card */
  41. .profile-page-flex {
  42.    flex-direction: column !important;
  43. }
  44. /* Profile card box */
  45. .pp-uc-background {
  46.  padding: 0;
  47.  width: 100%;
  48.  max-width: 1000px; /* needed so ultra wide screens don't look like trash. You can adjust, but can make your side text look bad. */
  49.   margin: auto; /* centers automatically */
  50.   background: #0000;
  51. }
  52.  
  53. /* Transparency */
  54. .pp-uc-background > div:empty { background: #0000 !important; }
  55. /* Yet another profile card box */
  56. .pp-uc-background > div:not(:empty) {
  57.   display: flex; justify-content: center;
  58. }
  59.  
  60. /* Main grid for split layout */
  61. .profile-info-stack {
  62.   gap: 0.5rem;
  63.   justify-items: center;
  64.   align-items: start;
  65.   display: grid;
  66.   grid-template-columns: repeat(2, minmax(0, 1fr)); /* will create two equally sized columns */
  67.   grid-template-rows: auto 1fr auto;
  68.   grid-auto-rows: auto; /* will adapt newly created rows automatically */
  69. }
  70.  
  71. /* pfp */
  72. .pp-uc-avatar-container {
  73.   order: -1; /* will always take first cell, top left; */
  74.   grid-area: 1 / 1 / 4 / 2; /* will take the left grid cells, expanding nearly to the bottom */
  75.   overflow: hidden;
  76.   /* Style */
  77. }
  78.  
  79. .pp-uc-avatar-container img {
  80.   object-fit: cover;
  81.   border-radius: 0;
  82.   box-shadow: unset;
  83.   width: 100%;
  84.   height: 100%;
  85. }
  86.  
  87. /* profile info */
  88. .profile-info-stack-inner {
  89.   color: #f9f9f9;
  90.   width: 100%;
  91.   gap: 0;
  92.   grid-column: -1 / -2;
  93.   order: 1; /* will take the second grid cell, top right */
  94. }
  95.  
  96. /* your bio container to have on the right */
  97. .mainbox {
  98.   width: 100%;
  99.   height: 100%;
  100.   display: flex;
  101.   flex-flow: column;
  102.   grid-column: -1 / -2;
  103.   order: 2; /* will be under the user info in your desktop grid */
  104. }
  105.  
  106. .mainbox .textbox {
  107.   flex-grow: 1; /* takes full height always */
  108. }
  109.  
  110. /* follow / options button container */
  111. .pp-uc-about-me + div {
  112.   order: 3; /* will be under your custom text box */
  113.   grid-column: -1 / -2;
  114. }
  115. /* Fix */
  116. .pp-uc-about-me + div > div { margin-top: 0; }
  117. .profile-uc-follow-flex { display: contents; }
  118. .profile-info-stack-inner-flex { margin: unset; overflow: unset; }s-1vakbk4 { display: contents; }
  119.  
  120. /* Box for your new html */
  121. .restofprofile {
  122.   order: 10;
  123.   grid-column: 1 / -1;
  124.   height: 100%;
  125.   width: 100%;
  126. }
  127.  
  128. /* Under 800px, change the grid */
  129. @media only screen and (max-width: 799px) {
  130.   .profile-info-stack {
  131.     grid-template-columns: 100%; /* only one column */
  132.   }
  133.   .pp-uc-avatar-container {
  134.     grid-area: 1 / 1 / 2 / 2;
  135.   }
  136. }
  137.  
  138. </style>
  139.  
Advertisement
Add Comment
Please, Sign In to add comment