Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
5288 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  YouTube - problème CSS

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

YouTube - problème CSS

n°2360407
leroimerli​nbis
Posté le 23-08-2020 à 11:25:25  profilanswer
 


Salut les dingos du code :D
 
Je suis entrain de m'amuser avec le CSS de YouTube. J'ai un problème : sur la capture ci dessous, je voudrais déplacer le menu entouré en rouge plus haut. J'y arrive mais problème : les actions (clic de souris) associées aux boutons de ce menu sautent par la même occasion....
 
comment faire?
 
Merci!
 
https://i.imgur.com/njPVWfph.png

mood
Publicité
Posté le 23-08-2020 à 11:25:25  profilanswer
 

n°2364637
gelatine_v​elue
Posté le 14-10-2020 à 20:56:44  profilanswer
 

SI tu disais comment tu t'y prends, on pourrait peut etre te repondre.

n°2364778
leroimerli​nbis
Posté le 16-10-2020 à 10:20:09  profilanswer
 

gelatine_velue a écrit :

SI tu disais comment tu t'y prends, on pourrait peut etre te repondre.


 
C'est bon je suis arrivé à faire ce que je voulais :
 
https://i.imgur.com/N7vHmAsh.png
 
J'ai modifié toutes les pages YouTubes principales. Voilà le code CSS que j'ai mis dans un script stylish :
(Pour ceux qui veulent essayer, l'affichage est adapté à mon pc 13 pouces avec le zoom windows à 130% et le zoom pour YouTube à 89% sur firefox. Donc ça risque de poser des problèmes sur un autre pc, vous êtes prévenu.  :sweat: )
 
 

Code :
  1. #contents.ytd-rich-grid-renderer, #grid-title.ytd-rich-grid-renderer {
  2.     width: calc(95% - var(--ytd-rich-grid-item-margin) * 2);
  3.     }
  4. #avatar-link.ytd-rich-grid-media {
  5. margin-top: 4px;
  6. }
  7. ytd-video-meta-block.grid {
  8.   margin-left: -4px;
  9. }
  10. #video-title.ytd-rich-grid-media {
  11. line-height: 1.8rem;
  12. margin-top: -10px;
  13. margin-left: 0px;   
  14. font-size: 1.4rem;   
  15. }
  16. #meta.ytd-rich-grid-media {
  17. margin-bottom: -40px;
  18. margin-left: 0px;   
  19. }
  20. paper-button.ytd-toggle-button-renderer {
  21. margin-top: 11px;
  22. margin-left: -369px; 
  23. margin-bottom: -40px;   
  24. }
  25. yt-icon.ytd-badge-supported-renderer {
  26. margin-top: -7px;
  27. }
  28. yt-formatted-string[has-link-only_]:not([force-default-style]) a.yt-simple-endpoint.yt-formatted-string {
  29. margin-left: 0px;
  30. margin-bottom: 7px;   
  31. font-size: 15px;
  32. }
  33. #channel-name.ytd-video-owner-renderer {
  34. margin-top: -17px;
  35. }
  36. ytd-toggle-button-renderer.style-scope:nth-child(2) > a:nth-child(1) {
  37. margin-right: -200px;
  38. margin-top: -35px;   
  39. }
  40. ytd-toggle-button-renderer.style-scope:nth-child(1) > a:nth-child(1) > yt-icon-button:nth-child(1) {
  41. margin-left: -90px;
  42. }
  43. #owner-sub-count {
  44. margin-left: 5px;
  45. }
  46. ytd-toggle-button-renderer.style-scope:nth-child(1) > a:nth-child(1) {
  47. margin-top: -35px;
  48. margin-right: -480px;
  49. }
  50. ytd-button-renderer.style-scope:nth-child(4) > a:nth-child(1) > yt-formatted-string:nth-child(2) {
  51. margin-top: 0px;
  52. }
  53. ytd-button-renderer.style-scope:nth-child(4) > a:nth-child(1) > yt-icon-button:nth-child(1) > button:nth-child(1) > yt-icon:nth-child(1) {
  54. margin-top: 0px;
  55. }
  56. ytd-video-primary-info-renderer {
  57. margin-left: 12px;
  58. }
  59. a.ytd-video-owner-renderer {
  60. margin-left: 160px;
  61. margin-top: -10px;   
  62. }
  63. ytd-subscribe-button-renderer.style-scope {
  64. margin-left: -1080px;
  65. margin-top: -15px;   
  66. }
  67. ytd-video-primary-info-renderer {
  68. border-bottom: 0px solid var(--yt-spec-10-percent-layer);
  69. }
  70. #guide-wrapper.ytd-app {
  71. margin-right: -27px;
  72. margin-left: 7px;
  73. }
  74. ytd-video-primary-info-renderer {
  75. padding: 10px 0 8px 0;
  76. }
  77. #top-row.ytd-video-secondary-info-renderer {
  78. padding-top: 0px;
  79. } 
  80. #text.ytd-channel-name {
  81.     line-height: var(--ytd-channel-name-text_-_line-height);
  82.     font-size: 22px;
  83.     }
  84.  
  85. #page-manager.ytd-app {
  86.     --ytd-toolbar-offset: 65px;
  87.     }
  88.  
  89. ytd-shelf-renderer {
  90.     margin-right: -68px;
  91.     }
  92.  
  93. ytd-watch-flexy[flexy_][is-two-columns_][is-extra-wide-video_] #primary.ytd-watch-flexy, ytd-watch-flexy[flexy_][is-two-columns_][is-four-three-to-sixteen-nine-video_] #primary.ytd-watch-flexy {
  94.     max-width: 66%;
  95.     }
  96.  
  97. ytd-watch-flexy:not([theater]):not([fullscreen]) #primary.ytd-watch-flexy, ytd-watch-flexy:not([theater]):not([fullscreen]) #secondary.ytd-watch-flexy {
  98.     padding-top: 0px;
  99.     }
  100.  
  101. yt-icon.yt-dropdown-menu:nth-child(1) {
  102.     margin-top: 14px;
  103.     margin-left: 1351px;
  104.     }
  105.  
  106. #channel-header.ytd-c4-tabbed-header-renderer {
  107.     padding: 9px 0px 1px 0px; 
  108.     margin-bottom: -5px;
  109.     margin-top: -10px;
  110.     margin-left: 30px; 
  111.     }
  112.  
  113. ytd-item-section-renderer.style-scope:nth-child(1) > div:nth-child(3) > ytd-shelf-renderer:nth-child(1) > div:nth-child(1) {
  114.     margin-top: 7px;
  115.     }
  116.  
  117. #info.ytd-channel-renderer {
  118.     padding: 0 464px 16px 16px;
  119.     }
  120.  
  121. #inner-header-container {
  122.     margin-bottom: -40px;
  123.     margin-top: 5px;
  124.     margin-left: -130px; 
  125.     }
  126.  
  127. paper-tabs.ytd-c4-tabbed-header-renderer {
  128.     --paper-tabs-selection-bar-color: red;
  129.     --paper-tabs-selection-bar_-_border-bottom-width: 3px; 
  130.     }
  131.  
  132. #tabsContent.paper-tabs {
  133.     height: 70%;
  134.     }
  135.  
  136. ytd-c4-tabbed-header-renderer[guide-persistent-and-visible] paper-tabs.ytd-c4-tabbed-header-renderer {
  137.     margin-top: -31px;
  138.     margin-left: 343px;
  139.     }
  140.  
  141. #header.ytd-c4-tabbed-header-renderer {
  142.     margin-left: 130px;
  143.     }
  144.  
  145. #inner-header-container > div:nth-child(1) {
  146.     margin-top: -73px;
  147.     margin-left: 140px;
  148.     }
  149.  
  150. #channel-container {
  151.     margin-top: 25px;
  152.     margin-left: -85px;
  153.     width: 37.5%;   
  154.     }
  155.  
  156. #contentContainer.app-header {
  157.     margin-top: -20px;
  158.     }
  159.  
  160. #header.ytd-c4-tabbed-header-renderer {
  161.     --app-header-background-front-layer_-_background-size: 95% auto;
  162.     }
  163.  
  164. ytd-channel-sub-menu-renderer.style-scope {
  165.     margin-top: -42px;
  166.     margin-left: 15px; 
  167.     }
  168.  
  169. #tabs-container.ytd-c4-tabbed-header-renderer {
  170.     height: 0px;
  171.     margin-top: -80px; 
  172.     }
  173.  
  174. paper-tab.style-scope:nth-child(8) {
  175.     display: none;
  176.     }
  177.  
  178. #channel-header-container.ytd-c4-tabbed-header-renderer {
  179.     margin-left: 100px;
  180.     }
  181.  
  182. ytd-subscribe-button-renderer.ytd-c4-tabbed-header-renderer {
  183.     margin-left: -260px;
  184.     margin-top: 41px;
  185.     }
  186.  
  187. #channel-container.ytd-c4-tabbed-header-renderer {
  188.     background-color: transparent;
  189.     }
  190.  
  191. #tabs-inner-container.ytd-c4-tabbed-header-renderer {
  192.     background-color: transparent;
  193.     }
  194.  
  195. #channel-header.ytd-c4-tabbed-header-renderer {
  196.     background-color: transparent;
  197.     margin-top: -15px; 
  198.     }
  199.  
  200. #channel-container.ytd-c4-tabbed-header-renderer, #tabs-container.ytd-c4-tabbed-header-renderer {
  201.     background-color: transparent;
  202.     }
  203.  
  204. yt-icon.ytd-subscription-notification-toggle-button-renderer {
  205.     margin-top: -10px;
  206.     margin-left: -10px;
  207.     }
  208.  
  209. #inner-header-container {
  210.     margin-bottom: -40px;
  211.     margin-top: 5px;
  212.     margin-left: -130px; 
  213.     }
  214.  
  215. paper-button.ytd-subscribe-button-renderer[subscribed] {
  216.     background-color: rgb(144,214,4);
  217.     color: ivory; 
  218.     }
  219.  
  220. ytd-app {
  221.     background: white; 
  222.     --app-drawer-width: 196px;
  223.     }
  224.  
  225. #video-title.ytd-rich-grid-video-renderer {
  226.     font-weight: 500;
  227.     margin-left: 5px;
  228.     line-height:initial;
  229.     }
  230.  
  231. ytd-video-meta-block[rich-meta] #channel-name.ytd-video-meta-block, ytd-video-meta-block[rich-meta] #metadata-line.ytd-video-meta-block {
  232.     margin-left: 5px;
  233.     font-size: 1.2rem;
  234.     }
  235.    
  236. #meta.ytd-rich-grid-video-renderer {
  237.     margin-bottom: -20px;
  238.     }
  239.  
  240. #metadata-line.ytd-grid-video-renderer {
  241.     margin-bottom: -17px;
  242.     max-height: 12px;
  243.     margin-top: 2px; 
  244.     font-size: 12px;
  245.     line-height: 11px;
  246.     }
  247.    
  248. #details.ytd-grid-video-renderer {
  249.     margin-bottom: 2px;
  250.     }
  251.  
  252. ytd-grid-video-renderer #video-title.yt-simple-endpoint.ytd-grid-video-renderer {
  253.     margin-top: -3px;
  254.     margin-bottom: -5px;
  255.     }
  256.  
  257. ytd-browse {
  258.     margin-left: -50px;
  259.     }
  260.  
  261. #channel-header-container.ytd-c4-tabbed-header-renderer {
  262.     max-width: 1250px;
  263.     }
  264.  
  265. #primary.ytd-watch-flexy {
  266.     padding-right: var(--ytd-margin-10x);
  267.     }
  268.  
  269. div.ytd-grid-renderer {
  270.     margin-left: -14px;
  271.     margin-top: -18px; 
  272.     }
  273.  
  274. #label.yt-dropdown-menu {
  275.     margin-left: -20px;
  276.     margin-top: 50px;
  277.     }
  278.  
  279. #other-buttons > ytd-button-renderer:nth-child(1) > a:nth-child(1) > yt-icon-button:nth-child(1) {
  280.     display: none;
  281.     }
  282.  
  283. #tabs-inner-container {
  284.     margin-top: 1px;
  285.     }
  286.    
  287. yt-dropdown-menu.style-scope:nth-child(2) > paper-menu-button:nth-child(1) > div:nth-child(1) > paper-button:nth-child(1) {
  288.     margin-top: 5px;
  289.     }
  290.  
  291. @media (min-width: 392px) {
  292.     #details.ytd-rich-grid-video-renderer {
  293.     margin-top: -12px;
  294.     margin-left: -4px;
  295.     margin-bottom: 4px;
  296.     }
  297.     }
  298.  
  299. ytd-rich-grid-renderer.style-scope {
  300.     margin-top: -38px;
  301.     margin-left: 31px; 
  302.     }
  303.  
  304. .badge-style-type-live-now {
  305.     margin-left: 94px;
  306.     margin-top: -21px;
  307.     }
  308.  
  309. ytd-rich-section-renderer.style-scope:nth-child {
  310.     margin-top: -40px;
  311.     }
  312.  
  313. ytd-rich-item-renderer.ytd-rich-grid-renderer {
  314.     margin-bottom: 35px;
  315.     }
  316.  
  317. ytd-grid-renderer.ytd-item-section-renderer > div:nth-child(2) {
  318.     width: 106%;
  319.     }
  320.  
  321. yt-dropdown-menu.style-scope:nth-child(2) > paper-menu-button:nth-child(1) > div:nth-child(1) > paper-button:nth-child(1) {
  322.     margin-left: 28px;
  323.     margin-top: -20px;
  324.     }
  325.  
  326. #right > iron-icon:nth-child(1) {
  327.     margin-left: -220px;
  328.     }
  329.  
  330. yt-dropdown-menu.style-scope:nth-child(2) > paper-menu-button:nth-child(1) > div:nth-child(1) > paper-button:nth-child(1) {
  331.     margin-left: 10px;
  332.     }
  333.  
  334. ytd-c4-tabbed-header-renderer[has-channel-art][guide-persistent-and-visible] .banner-visible-area.ytd-c4-tabbed-header-renderer {
  335.     height: calc((105vw - 240px) / 6.2 - 1px);
  336.     }
  337.  
  338. ytd-browse[page-subtype="channels"] {
  339.     background: none;
  340.     margin-left: -90px;
  341.     }
  342.  
  343. ytd-item-section-renderer.style-scope:nth-child(2) > div:nth-child(3) > ytd-shelf-renderer:nth-child(1) > div:nth-child(1) {
  344.     margin-left: 0px;
  345.     }
  346.    
  347. ytd-grid-video-renderer {
  348.     margin-left: 12px;
  349.     }
  350.  
  351. #contentContainer.app-drawer[persistent] {
  352.     width: 111%;
  353.     }
  354. ytd-topbar-logo-renderer.style-scope:nth-child(4) > a:nth-child(1) > div:nth-child(1) {
  355.     margin-left: 60px;
  356.     }
  357.  
  358. #end.ytd-masthead {
  359.     min-width: 275px;
  360.     }
  361.  
  362. a.ytd-guide-entry-renderer, paper-item.ytd-guide-entry-renderer {
  363.     width: 123%;
  364.     }
  365.  
  366. paper-item.ytd-guide-entry-renderer {
  367.     padding: 0 34px;
  368.     margin-left: 20px;
  369.     }
  370.  
  371. ytd-searchbox.style-scope {
  372.     margin-left: -116px;
  373.     margin-right: 357px;
  374.     }
  375.  
  376. #guide-section-title.ytd-guide-section-renderer {
  377.       color: red;
  378.       display: block;
  379.       padding: 18px 0px 10px;
  380.       font-size: var(--ytd-tab-system_-_font-size); font-weight: var(--ytd-tab-system_-_font-weight); letter-spacing: var(--ytd-tab-system_-_letter-spacing); text-transform: var(--ytd-tab-system_-_text-transform);
  381.       margin-left: 47px;
  382.       text-align: center;
  383.     }
  384.    
  385. #sections.ytd-guide-renderer > .ytd-guide-renderer:first-child {
  386.     padding: 0px 0;
  387.     }
  388.  
  389. #sections.ytd-guide-renderer > ytd-guide-section-renderer.ytd-guide-renderer:not(:first-child), #sections.ytd-guide-renderer > ytd-guide-subscriptions-section-renderer.ytd-guide-renderer {
  390.     width: 95%;
  391.     margin-left: -34px;
  392.     padding: 0px 0;
  393.     }
  394.    
  395. .title.ytd-guide-entry-renderer {
  396.     text-overflow: initial;
  397.     margin-left: -9px;
  398.     }
  399.  
  400. ytd-guide-section-renderer.style-scope:nth-child(1) > div:nth-child(2) {
  401.     margin-left: -34px;
  402.     }
  403.    
  404. ytd-guide-section-renderer {
  405.     --paper-item-min-height: 29px;
  406.     }
  407.  
  408. ytd-rich-grid-renderer:not([is-title-enabled]) #contents.ytd-rich-grid-renderer {
  409.     margin-top: 40px;
  410.     }
  411.  
  412. ytd-rich-grid-video-renderer {
  413.     margin-bottom: -24px;
  414.     margin-top: -3px;
  415.         margin-left: 0px;
  416. }
  417.  
  418. ytd-rich-item-renderer.ytd-rich-grid-renderer {
  419.     margin-bottom: 50px
  420. }


Message édité par leroimerlinbis le 16-10-2020 à 10:27:47

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  YouTube - problème CSS

 

Sujets relatifs
Problème reception mail depuis un formulaire (OVH)Proposition playlist Youtube SQL/Powershell/Postgres
[PHP] Problème nouveau avec exif_read_dataProbleme list -> apprentissage PHP
[Résolu] Performance Elementor et One Page, trop de CSS et JavascriptProblème de connexion de client (Socket)
problème de charactèresBlend Mode CSS
[C] Problème de pointeur[résolu] Problème jQuery
Plus de sujets relatifs à : YouTube - problème CSS


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)