Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37

Thread: HTML and CSS Tips and Tricks

  1. #11
    Ice's Avatar
    Joined
    Aug 2012
    Posts
    2,861
    Pronouns
    She/Her
    Userbars
    100
    Thanks
    11,589
    Thanked
    9,238/2,713
    DL/UL
    21/0
    Mentioned
    949 times
    Time Online
    116d 18h 6m
    Avg. Time Online
    39m
    Quote Originally Posted by Erik. View Post
    It was 7 pets yeah. But where do you find the coding for that?
    Most premades these days seem to make use of the carousel I think but in one of my previous userlookups I did stretch out my pet section (I believe I had to yeet the neohome/gallery zone to keep it aligned with the default content size); I can find the code for you later! I personally only have ever done it for 6 pets so 7 might be a stretch just due to what we're working with but I can take a look.

  2. #12
    statter's Avatar
    Joined
    Apr 2013
    Posts
    38
    Userbars
    1
    Thanks
    15
    Thanked
    45/8
    DL/UL
    10/0
    Mentioned
    6 times
    Time Online
    8d 1h 5m
    Avg. Time Online
    2m
    Are there any coding guides specifically for galleries and user lookups?

  3. #13
    Aero's Avatar
    Joined
    Sep 2020
    Posts
    1,672
    Pronouns
    she/her
    Userbars
    86
    Thanks
    6,329
    Thanked
    4,439/1,362
    DL/UL
    14/0
    Mentioned
    190 times
    Time Online
    85d 8h 11m
    Avg. Time Online
    1h 34m
    Quote Originally Posted by Erik. View Post
    Oh seconding this! I also once saw a lookup that showed every pet, and didn't have those two stupid pointers/slide thing. If someone knows the code for that that would be even better!

    Also, I hope coding won't be too difficult once the conversion is complete... It took me a looong time to figure out how to make my ul look the way I wanted it.

    Someone mentioned the expanding the widths thing for your Neopets div, but to get rid of the carousel controls you can do:
    .bx-controls {
    display: none;
    }

  4. The Following User Says Thank You to Aero For This Useful Post:

    valora (11-10-2020)

  5. #14
    Ice's Avatar
    Joined
    Aug 2012
    Posts
    2,861
    Pronouns
    She/Her
    Userbars
    100
    Thanks
    11,589
    Thanked
    9,238/2,713
    DL/UL
    21/0
    Mentioned
    949 times
    Time Online
    116d 18h 6m
    Avg. Time Online
    39m
    @(you need an account to see links)

    Ok I trimmed this down during my lunch break - basically what this bit of basic code does is removes your neohome section (if you have one), remove the scroll arrows (as Aero explained), crunch the individual pet units (.bx-wrapper li) in the carousel to 128px to fit in 1 more guy (I tested this with 6 pets and kept going until my first pet repeated fully) and adjust the height of your pet images also to be 128px so that they're back to being square. This assumes exactly 7 pets and your content is still the default UL size (~960px). Hope this helps! Feel free to DM me if something doesn't work because chances are it's pretty janky lol.

    <style>
    #userneohome, .bx-controls {
    display: none;
    }
    .bx-wrapper li {
    margin-right: 10px !important;
    width: 128px !important;
    }
    #userneopets img {
    height: 128px;
    }
    </style>

  6. The Following 2 Users Say Thank You to Ice For This Useful Post:

    valora (11-10-2020),Zapdos (11-11-2020)

  7. #15
    Gyaoo!
    Zapdos's Avatar
    Joined
    Aug 2020
    Posts
    768
    Pronouns
    【she ⚡ her】
    Userbars
    68
    Thanks
    3,472
    Thanked
    3,294/801
    DL/UL
    15/0
    Mentioned
    334 times
    Time Online
    52d 15h 29m
    Avg. Time Online
    56m
    Awesome, thank you so much everyone for your responses and interest! Let's make beautiful coding accessible for all clraiks

    I'll start updating the main post ASAP (I'm on leave/just got out of hospital so I have free time yay lol) and format it + add what we have so far!
    I'm about to redo some petpages and lookups of mine, so I'll also take snips of coding out of those and throw them up here.

    Let's get the ball rolling!


    (you need an account to see links)


    (you need an account to see links)


    Thank you Zenitsu and Greyfaerie for my siggy UBs respectively!
    Thank you Hollow for the vector art!


  8. The Following 2 Users Say Thank You to Zapdos For This Useful Post:

    Ice (11-09-2020),valora (11-10-2020)

  9. #16
    valora's Avatar
    Joined
    Oct 2019
    Posts
    194
    Userbars
    20
    Thanks
    2,108
    Thanked
    1,102/229
    Mentioned
    57 times
    Time Online
    16d 13h 2m
    Avg. Time Online
    14m
    HOVER IMAGES
    Since floats were already covered I did images that change on hover instead:
    Code:
    <style>
    #hello {
    width: 400px;
    height: 300px;
    background: url("originalimageurl");
    }
    #hello:hover {
    width: 400px;
    height: 300px;
    background: url("hoverimageurl");
    }
    </style>
    
    <div id="hello"></div>
    You just need to check the width/height of your image and put those values in place of the 400px/300px in the style tags.



    TEXT BOXES
    Not sure about horizontal scrolling, but for vertical you just need to add an overflow property:
    Code:
    <style>
    .hello {
    width: 500px;
    height: 500px;
    overflow: auto;
    }
    </style>
    
    <div class="hello">text goes here</div>
    You can also use "overflow: hidden;" to completely stop any scrolling in the div.

    Some other useful stuff to add to your divs:
    "background: #fff;" -- adds a background colour
    "border: 1px solid #fff;" -- adds a border (you can use dashed/dotted/double in place of solid)
    "float: left;" and "float: right;" -- makes your div float to the left or right of other text/images/divs
    "margin: 10px 20px 30px 40px;" -- moves the box around, the values are for top, right, bottom, left respectively
    "border-radius: 10px 20px 30px 40px;" -- gives your div rounded corners, the values are for top-left, top-right, bottom-right, bottom-left respectively, but this has to be outside the style tags like this:
    Code:
    <div class="hello" style="border-radius: 10px 20px 30px 40px;">


    BG CODING
    You can code a background image either by using the "body" property in the style tags or by creating an image class with a fixed position.

    First method:
    Code:
    <style>
    body {
    background: url("imageurlhere") fixed;
    background-color: #fff;
    background-repeat: no-repeat;
    }
    </style>
    You can remove "fixed" if you want the image to scroll with the page and also remove "background-repeat: no-repeat;" if you want a repeating image, like if you're using a seamless pattern.

    Second method:
    Code:
    <style>
    .bg {
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: auto;
    }
    </style>
    
    <img src="imageurlhere" class="bg" style="position: fixed;">
    (I think I found this on /~Xaia a while back)
    This makes a 100% width fixed background image. You can also set the height to 100% if you want to stretch it to make sure it always fills the page, and of course change the values to whatever % you want.



    NAVIGATION ANCHORS
    These are pretty straightforward, you can basically designate certain points on the page (i.e. different sections) or parts of the text and link to them from anywhere, like from a navigation bar:
    Code:
    Here is <a href="#one">section one</a> of my page.
    
    <a name="one"></a>Section one goes here.


    Will add something for splash pages and nav bars later when I'm more awake
    Last edited by valora; 11-10-2020 at 04:28 AM.

  10. The Following 2 Users Say Thank You to valora For This Useful Post:

    Ice (11-10-2020),Zapdos (11-10-2020)

  11. #17
    Gyaoo!
    Zapdos's Avatar
    Joined
    Aug 2020
    Posts
    768
    Pronouns
    【she ⚡ her】
    Userbars
    68
    Thanks
    3,472
    Thanked
    3,294/801
    DL/UL
    15/0
    Mentioned
    334 times
    Time Online
    52d 15h 29m
    Avg. Time Online
    56m
    Quote Originally Posted by valora View Post
    HOVER IMAGES
    Since floats were already covered I did images that change on hover instead:
    Code:
    <style>
    #hello {
    width: 400px;
    height: 300px;
    background: url("originalimageurl");
    }
    #hello:hover {
    width: 400px;
    height: 300px;
    background: url("hoverimageurl");
    }
    </style>
    
    <div id="hello"></div>
    You just need to check the width/height of your image and put those values in place of the 400px/300px in the style tags.



    TEXT BOXES
    Not sure about horizontal scrolling, but for vertical you just need to add an overflow property:
    Code:
    <style>
    .hello {
    width: 500px;
    height: 500px;
    overflow: auto;
    }
    </style>
    
    <div class="hello">text goes here</div>
    You can also use "overflow: hidden;" to completely stop any scrolling in the div.

    Some other useful stuff to add to your divs:
    "background: #fff;" -- adds a background colour
    "border: 1px solid #fff;" -- adds a border (you can use dashed/dotted/double in place of solid)
    "float: left;" and "float: right;" -- makes your div float to the left or right of other text/images/divs
    "margin: 10px 20px 30px 40px;" -- moves the box around, the values are for top, right, bottom, left respectively
    "border-radius: 10px 20px 30px 40px;" -- gives your div rounded corners, the values are for top-left, top-right, bottom-right, bottom-left respectively, but this has to be outside the style tags like this:
    Code:
    <div class="hello" style="border-radius: 10px 20px 30px 40px;">


    BG CODING
    You can code a background image either by using the "body" property in the style tags or by creating an image class with a fixed position.

    First method:
    Code:
    <style>
    body {
    background: url("imageurlhere") fixed;
    background-color: #fff;
    background-repeat: no-repeat;
    }
    </style>
    You can remove "fixed" if you want the image to scroll with the page and also remove "background-repeat: no-repeat;" if you want a repeating image, like if you're using a seamless pattern.

    Second method:
    Code:
    <style>
    .bg {
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: auto;
    }
    </style>
    
    <img src="imageurlhere" class="bg" style="position: fixed;">
    (I think I found this on /~Xaia a while back)
    This makes a 100% width fixed background image. You can also set the height to 100% if you want to stretch it to make sure it always fills the page, and of course change the values to whatever % you want.



    NAVIGATION ANCHORS
    These are pretty straightforward, you can basically designate certain points on the page (i.e. different sections) or parts of the text and link to them from anywhere, like from a navigation bar:
    Code:
    Here is <a href="#one">section one</a> of my page.
    
    <a name="one"></a>Section one goes here.


    Will add something for splash pages and nav bars later when I'm more awake
    You're amazing Valora! I'll add these to the front page ASAP!


    (you need an account to see links)


    (you need an account to see links)


    Thank you Zenitsu and Greyfaerie for my siggy UBs respectively!
    Thank you Hollow for the vector art!


  12. The Following User Says Thank You to Zapdos For This Useful Post:

    valora (11-11-2020)

  13. #18
    Gyaoo!
    Zapdos's Avatar
    Joined
    Aug 2020
    Posts
    768
    Pronouns
    【she ⚡ her】
    Userbars
    68
    Thanks
    3,472
    Thanked
    3,294/801
    DL/UL
    15/0
    Mentioned
    334 times
    Time Online
    52d 15h 29m
    Avg. Time Online
    56m
    Finally formatted the post and added codes, thanks heaps to everyone that has contributed so far! I think this is going to turn into a really awesome resource, but unsurprising as Clraiks only deal in awesome
    Let's keep going!

    Like what has already been occurring, I'd like to open this thread up to CSS/HTML questions as well as having the front resource page. Hopefully we can all help each other achieve coding greatness!


    (you need an account to see links)


    (you need an account to see links)


    Thank you Zenitsu and Greyfaerie for my siggy UBs respectively!
    Thank you Hollow for the vector art!


  14. The Following User Says Thank You to Zapdos For This Useful Post:

    Ice (11-11-2020)

  15. #19
    Ice's Avatar
    Joined
    Aug 2012
    Posts
    2,861
    Pronouns
    She/Her
    Userbars
    100
    Thanks
    11,589
    Thanked
    9,238/2,713
    DL/UL
    21/0
    Mentioned
    949 times
    Time Online
    116d 18h 6m
    Avg. Time Online
    39m
    Quote Originally Posted by statter View Post
    Are there any coding guides specifically for galleries and user lookups?
    Was there something in particular you wanted to do? I haven't seen a lot of pre-made gallery coding (not that I've been looking much) but there are tons of pre-made/customizable lookup codes out there, depending on what you're looking for!

    On that note @(you need an account to see links) should we also compile all the popular on-site pre-made graphics petpages? Not sure if that's been done before or if it's something we want to list here (on ck or otherwise).

  16. The Following 2 Users Say Thank You to Ice For This Useful Post:

    valora (11-11-2020),Zapdos (11-11-2020)

  17. #20
    Gyaoo!
    Zapdos's Avatar
    Joined
    Aug 2020
    Posts
    768
    Pronouns
    【she ⚡ her】
    Userbars
    68
    Thanks
    3,472
    Thanked
    3,294/801
    DL/UL
    15/0
    Mentioned
    334 times
    Time Online
    52d 15h 29m
    Avg. Time Online
    56m
    Quote Originally Posted by Ice View Post
    Was there something in particular you wanted to do? I haven't seen a lot of pre-made gallery coding (not that I've been looking much) but there are tons of pre-made/customizable lookup codes out there, depending on what you're looking for!

    On that note @(you need an account to see links) should we also compile all the popular on-site pre-made graphics petpages? Not sure if that's been done before or if it's something we want to list here (on ck or otherwise).
    I think that's a great idea! I think we should also add a link to the basic starter guides too, as the coding we have might be closer to novice level.
    A curated and updated list of active premade sites would be fantastic, let's do it! I'll start scouring as well.


    (you need an account to see links)


    (you need an account to see links)


    Thank you Zenitsu and Greyfaerie for my siggy UBs respectively!
    Thank you Hollow for the vector art!


  18. The Following User Says Thank You to Zapdos For This Useful Post:

    Ice (11-11-2020)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •