inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,088
January 2009
nowdocking
|
Post by nowdocking on Jul 18, 2009 7:09:23 GMT -8
Is there a way to make text fit better with images in posts? Right now, text either has to be above or below the pictures. If it's a small picture, text can be butted up next to it, but it leaves a large amount of blank space.
How can a block of text be made to fit alongside an image?
Thanks.
|
|
poorman3
inherit
-3574071
0
Nov 22, 2024 21:33:38 GMT -8
poorman3
0
January 1970
GUEST
|
Post by poorman3 on Jul 18, 2009 7:19:57 GMT -8
Is there a way to make text fit better with images in posts? Right now, text either has to be above or below the pictures. If it's a small picture, text can be butted up next to it, but it leaves a large amount of blank space. How can a block of text be made to fit alongside an image? Thanks. Like this? | text here text here text here text here text here |
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 18, 2009 10:34:55 GMT -8
I could have sworn I saw Wrighty or Triad working on a [float] ubbc awhile back but I can't find the thread but if you have the enhanced UBBC code you could probably wrap the image in a single cell table then use the [atrb] tag to make the table borderless as well as float it left or right [table] [tr] [td] [img]http://i31./c363/AnnaKneeMouse/2540246d39e6513c0bca5.gif[/img] [atrb=border,0,true] [atrb=style,float:left,true] [/td] [/tr] [/table]
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,088
January 2009
nowdocking
|
Post by nowdocking on Jul 18, 2009 16:25:29 GMT -8
Thanks to both of you. Craig said that he once designed a code for this, but couldn't find it.
The thing is with my forum is that it has lots of threads about travel and different places, so people are encouraged to post sequences of pictures. Maybe it's the age group, but they seem to have enough trouble learning how to post images, even though there's a permanent tutorial thread about it.
I will definitely experiment with your help for my own posts, but I was looking for something that would be very simple for everyone to use.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 19, 2009 18:02:50 GMT -8
<script type="text/javascript"> <!-- //Float images in posts (Global or board footer) (function(){ var e,t,o,n,bones for(e=document.getElementsByTagName('p'),t=0;(o=e[t]);t++){ n=o.getAttribute('align');if(!n)continue; bones= o.innerText?o.innerText:o.textContent; bones=bones?bones.replace(/\n/g,''):'' if(n.match(/right|left/i) && bones=='' && o.getElementsByTagName('img').length ){ o.style.cssFloat=o.style.styleFloat=n; } } })() // --> </script>Wrap the image in (left) or (right) UBBC to have it float left or right thus allowing text to wrap around it. The image and only the image should be in the left/right tag. Any text inside there with the image and the image will be left untouched.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 19, 2009 19:02:47 GMT -8
kudos on the variable names there!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 19, 2009 21:39:18 GMT -8
;D
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,088
January 2009
nowdocking
|
Post by nowdocking on Jul 19, 2009 22:46:18 GMT -8
Wow Wow Wow!!
This is great! It's exactly what I wanted and it's so easy to use.
Thank you very, very much. This was extremely generous. I really appreciate your time and effort.
Thanks!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 20, 2009 5:01:42 GMT -8
you're welcome
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,088
January 2009
nowdocking
|
Post by nowdocking on Jul 20, 2009 7:43:03 GMT -8
Is there a way to automatically create a space between the text and right margin of the image?
When the image is against the left margin, the text is tight up against the right margin of the image. It doesn't look bad, but it looks a lot better with at least some space between image and text.
Right now I'm doing it by writing the text, then Previewing, then adding the & n b s p ; before each line of text where it butts up against the right margin of the image.
I tried using the block quote tags, but that doesn't work. Any suggestions?
Thanks.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 20, 2009 8:00:16 GMT -8
try this
<script type="text/javascript"> <!-- //Float images in posts (Global or board footer) (function(){ var e,t,o,n,bones for(e=document.getElementsByTagName('p'),t=0;(o=e[t]);t++){ n=o.getAttribute('align');if(!n)continue; bones= o.innerText?o.innerText:o.textContent; bones=bones?bones.replace(/\n/g,''):'' if(n.match(/right|left/i) && bones=='' && o.getElementsByTagName('img').length ){ o.style.cssFloat=o.style.styleFloat=n; o.style.padding= (n.match(/left/i))?'0px 18px 18px 0px':'0px 0px 18px 18px'; } } })() // --> </script>
adjust numbers in that new line to taste
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,088
January 2009
nowdocking
|
Post by nowdocking on Jul 20, 2009 8:45:39 GMT -8
OKAY! Yes, that's perfect.
I think anyone who sees this code is going to want to grab it for their forum. This is a great tool.
Thank you, Eton Bones -- brilliant!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 21, 2009 9:51:06 GMT -8
enjoy
|
|
inherit
200412
0
Sept 25, 2013 16:09:36 GMT -8
silkydhp
4
September 2013
silkydhp
|
Post by silkydhp on Sept 25, 2013 4:09:03 GMT -8
enjoy Hi guys. This is exactly the sort of thing I need to do, but I'm a massive newbie at the scripting side of things. How do I make this script work?
|
|
inherit
200412
0
Sept 25, 2013 16:09:36 GMT -8
silkydhp
4
September 2013
silkydhp
|
Post by silkydhp on Sept 25, 2013 4:21:51 GMT -8
To clarify my above post, I'd like to have the images alternate sides as shown here, but with the font wrapped around the images.
|
|