A simple CSS fix to stop long url's breaking pages

Started by roganty, January 26, 2024, 11:11:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

roganty

Edit: I had originally intended for this post to be mainly for the eyes @Tank. I think I may have started something, I do apologise.

Has anyone noticed that long URL's stretch the page and cause sideways scrolling?

I have a simple CSS fix that will solve the problem word-break: break-word

#forumposts .windowbg, #forumposts .approvebg, #forumposts .approvebg2, #pmFolder .windowbg {
    overflow: visible;
    word-break: break-word;
}

 8)

Railwaygun

Yet when I surveyed all that my hands had done and what I had toiled to achieve, everything was meaningless, a chasing after the wind;
Ecclesiastes 2:11

This has been a public service announcement
It may contain alternative facts

Caveat lector

The largest Railwaygun, Armoured Train & Military Rail group in the world!

https://groups.io/g/railwaygun/topics

NGF Military threads

https://www.ngaugeforum.co.uk/SMFN/index.php?board=146.0

My Military Rail Pinterest area
https://uk.pinterest.com/NDRobotnik/

10mm / N armour Threads
https://www.10mm-wargaming.com/

Motto: Semper ubi, sub ubi

Steven B

It's code that would need to go in the underlying forum style settings.

tinyurl.com (or similar) works well.

So to does using the "Insert a link" button on the message tool bar.

Steven B

PLD

MUCH simpler is to use the facility the forum bb-code already provides...  :-\

I don't get why people regularly come up with 'clever' way (read over complicated technical solutions) when it's there in front of you...

There's even a button on the toolbar that does it for you!

Just put the url in the URL box and a short description in the Description box. It really is that simple...

For those interested in what it does under the hood; this (minus the red *)
[*url="https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh"]Railwaygun's Link[/url]

displays:
Railwaygun's Link

And of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)

ntpntpntp

#4
I agree, the button to add a link deals with it quite well, but some folk still seem to grab hugely long links with unnecessary clutter. 

If you know what you're doing  it's still worth only copying in the relevant part of the link (ignoring session parameters etc.) for example ebay listings you only need up to the end of the item number and not all the other stuff.

Totally random example (which just happens to be the first Kato Unitrack set I ever bought :) )

Stupidly long link generated by ebay:


... but you only need this:
Nick.   2021 celebrating the 25th anniversary of "Königshafen" exhibition layout!
https://www.ngaugeforum.co.uk/SMFN/index.php?topic=50050.0

Papyrus


[/quote] And of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)
[/quote]

Sorry, that's a bit unfair. I was castigated about this recently. It was the first time I had come across the problem so I am prepared to be classed as ignorant but don't lump me in with selfish or lazy. I assumed it was a forum problem. I know what to do now, but there had been no information before. Not all of us are computer experts.

Chris

njee20

Quote from: PLD on January 26, 2024, 01:33:06 PMMUCH simpler is to use the facility the forum bb-code already provides...  :-\

I don't get why people regularly come up with 'clever' way (read over complicated technical solutions) when it's there in front of you...

There's even a button on the toolbar that does it for you!

Just put the url in the URL box and a short description in the Description box. It really is that simple...

For those interested in what it does under the hood; this (minus the red *)
[*url="https://www.hattons.co.uk/stocklist/siteresults?search%2Fscales%2FN%2Fstockstatus%2FInStock=&_kx=b-clECEYoYOD019iLv8mMKPt3frX7-n13giy_gaFzao%3D.JGQeXh"]Railwaygun's Link[/url]

displays:
Railwaygun's Link

And of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)

Of course the irony is that this post has broken the page  ;D

PLD

Quote from: njee20 on January 26, 2024, 07:04:37 PMOf course the irony is that this post has broken the page  ;D
Are you assuming it wasn't deliberate  ;)   >:D

Newportnobby

Quote from: PLD on January 26, 2024, 07:31:45 PM
Quote from: njee20 on January 26, 2024, 07:04:37 PMOf course the irony is that this post has broken the page  ;D
Are you assuming it wasn't deliberate  ;)   >:D

Are you a Faithful or a Traitor? :angel:

roganty

Whoopsie! I think my post may have been ill worded and confused the inhabitants of this forum :doh:

My original post was mainly meant for @Tank (but only then if he can edit the CSS files)

I'll see myself out...

PLD

Quote from: Papyrus on January 26, 2024, 06:36:14 PM
QuoteAnd of course however many solutions are offered and however many times they are prompted, there will always be the selfish/lazy/ignorant who continue to ignore it...  ::)

Sorry, that's a bit unfair. I was castigated about this recently. It was the first time I had come across the problem so I am prepared to be classed as ignorant but don't lump me in with selfish or lazy. I assumed it was a forum problem. I know what to do now, but there had been no information before. Not all of us are computer experts.

Chris
Not aimed at you personally and first time offenders are forgiven, but there are a few repeat offenders, (mostly serial posters in eBay threads) who evidently don't listen & learn...

Bealman

Vision over visibility. Bono, U2.

Newportnobby

'Collective Consciousness Society'
They had a hit with Led Zep's 'Whole Lotta Love' inc blues guitarist Alexis Korner :D

PaulCheffus

Quote from: Bealman on January 27, 2024, 08:31:16 AMI don't even know what CCS means! :worried:

Hi

Cascading Style Sheet.

It's for managing the website look for example the font size, colour and type. It allows you to make one change in the style sheet and it affects all elements on the webpage that have that style attached.

Cheers

Paul
Procrastination - The Thief of Time.

Workbench thread
https://www.ngaugeforum.co.uk/SMFN/index.php?topic=54708.msg724969#msg724969

roganty

Quote from: PLD on January 27, 2024, 08:01:25 AMNot aimed at you personally and first time offenders are forgiven, but there are a few repeat offenders, (mostly serial posters in eBay threads) who evidently don't listen & learn...

It was an eBay link that got me thinking about this. But when posting links to eBay all you need is everything up to the ? everything else is irrelevant

Example:

https://www.ebay.co.uk/itm/266502580272?hash=item3e0ccaa830:g:i2cAAOS
we1RlT5NY&amdata=enc%3AAQAIAAAA0PJPDYJbSMdoSUU8%2BVRkqhbwFMLaRsR%2B7k
wnfdIklDNK3TZu8iLcVHUEM7Tdo1xl5LjHrcW95opYMI%2B2AFxzqRZnRNFrTEYcxv3k3
7ZsIruGwJNlKJ3AnAQx05VCrgIcMbvkYNwPyMCCors21WeMxvlqvsiJ8Ksw6BUMBVWEece
gYMuzAlilRE8scRc2ye5GAas6vOR7MoctHgozsrkcG7jCGRxrAQieFTIQKX4qgBAZ1U%2
FIn2eKNPuw2zKdQLMbvVet3XSKwuzhVknmzOq5O9Y%3D%7Ctkp%3ABFBMsIy4q6lj


This goes to the same item:
https://www.ebay.co.uk/itm/266502580272

This was just the first item I found that created that long url (I also added line breaks to stop it from breaking the page)


Please Support Us!
April Goal: £100.00
Due Date: Apr 30
Total Receipts: £50.23
Below Goal: £49.77
Site Currency: GBP
50% 
April Donations