radicaloptimism

Split Profile Card Layout (PFP on Right ver.)

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