Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer day - @372.70
Activity rating: Four Stars Posts & Arts: 60/1k.beats ~ Boop! The forum will close in 628.beats! Random | Recent Posts | Guild Recents
News: There's a great big indie web tomorrow! :smile: Guild Events: There are no events!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Help with Border-Image CSS - SOLVED


« previous next »
Pages: [1] Print Embed
Author Topic: Help with Border-Image CSS - SOLVED  (Read 328 times)
ThistleKnight
Newbie ⚓︎
*
View Profile WWW


⛺︎ My Room

Guild Memberships:
Artifacts:
libraHores???Joined 2026!
« on: a Summer night » Embed

Hello! I am having a problem I'm not sure how to solve. I am working on my links page, and I have a sidenav bar in that page. The padding was displaying perfectly until I added my border-image. this is the first time I've used border-image and I'm not sure whats causing it to shrink so much inside. I linked the page above for people to inspect, and also, here is the code I added to my nav element:
Code
border-style: solid;
border-width: 70px;
border-image-source: url("images/fullscroll.png");
border-image-slice: 19% fill;
border-image-repeat: stretch round;
border-image-outset: 40px;

Thanks all!

« Last Edit: a Summer night by ThistleKnight » Logged

https://thistleknight.nekoweb.org/images/buttonthistleknightcastlewebsite.gif

Artifact Swap: Bird Creature
Rubbereon
Full Member ⚓︎
***
View Profile WWWArt


⛺︎ My Room
SpaceHey: Friend Me!
Matrix: Chat!
XMPP: Chat!

Guild Memberships:
Artifacts:
Visited on Melon's 10th Anniversary!Joined 2025!
« Reply #1 on: a Summer night » Embed

If you open inspect element with f12 and tick off "border-image-source: url("images/fullscroll.png");" you'll immediately see why. The border width (displayed in black) is huge for some reason. (See attached image if it shows up, I dunno how melonland handles attachments)

Turning "border-width: 70px;" off fixes your problem, but consequently, it removes parts of the graphic like the top part of the scroll.

Maybe this can be fixed with some overflow shenanigans, but I don't know how.

Setting all the nav padding values to 0 kind of improves the navbar, but that doesn't fix the problem completely. I'm not sure you'd wanna mess with negative values, but I tried and it wouldn't work, so I'm not sure it's possible.

Alternatively, something I noticed is that by disabling "width: 220px;" it allows the full navbar to display correctly, however now it overlaps with the main area.

My proposed solutions with a small tradeoff for each.

First solution if you don't mind having a smaller-looking scroll.
  • Reduce border-width to 36px at most or 24px at the very least
  • Reduce padding to 0px
  • If border-width is 36px, set the regular width to 240px, it should not overlap with the main scroll area
  • Done, it should look fine now.

Second solution if you don't mind the size of the scroll relative to the page.
  • Increase nav width to 400px
  • Change "left" to 50 on the navbar
  • Change "margin-right" to 50px on the main area
  • and also "margin-left" to 520px on the main area to keep the same size
  • Done, should look good, but it will use nearly all your page, no dead air basically.
  • Bonus: You can still set the padding to 0 if you want, but it doesn't look like it improves things much, so I omitted it.

Again, maybe it's possible to avoid this problem with overflow or by messing with padding and margin on the bullet list area, but I don't know how.  :drat:



* css issue.png (254.89 kB, 493x627 - viewed 24 times.)
Logged

https://bettysgraphics.neocities.org/images/animals/cat%20695.gifFuzzy fwiendhttps://bettysgraphics.neocities.org/images/animals/cat%20696.gifhttps://bettysgraphics.neocities.org/images/animals/cat%20697.gif
https://rubbereon.nekoweb.org/img/penguin.gifLinux userhttps://rubbereon.nekoweb.org/img/penguin.gif
You can also find me on Comfybox.
IndigoGolem
Sr. Member ⚓︎
****
View Profile WWW


What's personal text?
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
Visited on Melon's 10th Anniversary!I got robbed by Dan Q on Melonland!Joined 2025!
« Reply #2 on: a Summer night » Embed

The best solution i found is to decrease border-width and also have border-image-width (separate properties) for the <nav>, and make the <nav> wide enough (240px) to fit all the buttons without needing a horizontal scroll bar. But i will mention, this makes the page look worse on mobile, or at least with Firefox' responsive design mode.

I'm sure there is a simple way to make the border expand out as border-width increases, rather than always expanding down and right, but i don't know what that way might be.

I've attached a screenshot, and here's the updated CSS. Is this close to what you're looking for?

Spoiler
Code
nav {
    width: 240px;
    height: auto; 
    max-height: 90%;
    position: fixed;
    top: 50px;
    left: 150px;
    overflow: scroll;
    padding: 0px;
    scrollbar-width:none;
        border-style: solid;
        border-width: 30px;
        border-image-source: url("images/fullscroll.png");
        border-image-slice: 19% fill;
        border-image-repeat: stretch round;
        border-image-outset: 40px;
    border-image-width: 70px;
}
[close]




* Screenshot_20260624_190223.jpg (122.3 kB, 1069x743 - viewed 31 times.)
Logged

-Indigo, Anve Ozo %

Artifact Swap: CreampuffNoidRice BoyIconMichael's HatTiny Batman HeadWildflowers!
ThistleKnight
Newbie ⚓︎
*
View Profile WWW


⛺︎ My Room

Guild Memberships:
Artifacts:
libraHores???Joined 2026!
« Reply #3 on: a Summer night » Embed

Thanks everyone for your input!! I looked at the messages I got and fudged around with the image and the code until I got to a point where I feel like its looking good.
Heres what I did:

1. edited the border-image itself to be closer to the final shape
2. while messing with the border-width, I tried setting it at 0px, which seemed to fix alot of my problems? I am not sure how, lol
3. changed to overflow: auto;
4. lowered the font size of the nav buttons & removed the boxes around them to allow for more space
5. changed my section headers to h2 for better semantic html
6. I put everything thats in the nav bar into its own div wrapper so that I could add padding to the nav to edit the scroll overflow cut-off so its not in a strange place(you would only notice this if I get enough "sections" to go past the max-height I set)(this was not working with just the nav by itself, it would change the size of the nav)

Logged

https://thistleknight.nekoweb.org/images/buttonthistleknightcastlewebsite.gif

Artifact Swap: Bird Creature
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Zap! Want to Login or Join ? Forum Art Hub Chat Webring Editor Recent Edits Tenement Arcade Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Minecraft: Online
Join: craft.melonking.net