Notice: The devs are no longer actively involved in the forum, so any bug reports regarding the Stylish extension or this website should be sent to them directly at contact@userstyles.org.
Changing your Avatar.
The only way to currently change a forum avatar is through Gravatar.com. The email address used for your Userstyles.org account must be one of the email addresses that is registered to your Gravatar account.

youtube css request followup: here's a picture of a broken code

here's the picture: https://imgur.com/a/4qiNTKk

the code is on here: https://forum.userstyles.org/discussion/67242/hey-where-my-youtube-css-request-go

this post is specific to the css code. the discussion has gone to other things

test links

  • any youtube search result page

  • www.youtube.com/results?sp=CAMSBBABGAJCBAgBEgA%253D&search_query=astro+teller

here's teh code for convenience:

@-moz-document url-prefix("www.youtube.com/results?"), url-prefix("https://www.youtube.com/results?") {
/* Video Title height change to fit the rest */
a#video-title.yt-simple-endpoint.style-scope.ytd-video-renderer {
    position: relative !important;
    top: 20% !important;
    padding-top: 6px !important;
}

/* Views position change and index to be visible */
div#metadata-line.style-scope.ytd-video-meta-block > *:nth-child(1) {
    position: absolute !important;
    top: -9% !important;
    margin-left: -9% !important;
    z-index: 9999 !important;
}
/* Upload time */
div#metadata-line.style-scope.ytd-video-meta-block > *:nth-child(2) {
    position: absolute !important;
    top: 0px !important;
    margin-left: -9% !important;
    z-index: 9999 !important;
    padding-bottom: 50px !important;
}
}

Comments

  • edited June 2018 Firefox
    Maybe you have other youtube template.

    Making styles for huge websites/services can be difficult as they have many templates, for example, for every popular browser.
  • edited June 2018 Firefox
    Come on man - you can do it, just change the margins to fit in your case.
    My css is just a working sample, if you change the numbers, it'll work perfectly.
    it's also a good idea in general, depending on demands.

    *I reviewed your case and i understand your problem, you can just copy the part and add :nth-child(1) and another with :nth-child(2) with different margins or specify exactly the path.
    *If you need a copypasta, ask me, i'll check again later-on.
  • edited June 2018 Chrome

    other youtube template

    dont have anything, i turned off different things to make sure it wasnt any youtube extensions or anything

    change the numbers

    to what? where the text is broken for each of the different videos as seen on the image/picture

  • edited June 2018 Firefox
    i got it, replace the margin-left: -9% with left: 20.3%.
    I mean, you can just change the number 20.3% to suit your screen and needs.
    Did i helped you?

    *The problem existed as margin is calculated relative to a parent, but, left is static, non-hierarchical.

  • 1) 'margin is calculated relative to a parent,'

    2) 'left is static, non-hierarchical.'

    so i guess something in the 'hierarachy' of the code causes the probelms using 'margin'

    using 'left', it's still showing inconsistently

    but at least the text isnt hiding behind the 'video preview' now

    if 'left' is 'static' i dunno why it's still showing inconsistently
  • it works now i dunno why

    this

    padding-bottom: 200px !important;
    

    doesnt seem to be doing anything, i tried it changing it around but it doesnt seem to be doing anything

    i dunno if the other code is making that part not work or what's going on

Sign In or Register to comment.