Howto add an inage in the News

Started by IceBear, September 29, 2016, 03:16:37 AM

Previous topic - Next topic

IceBear


How do I add an image to the right or between the text in Forum News ?

Screenshot
http://prntscr.com/cnnmu7

Grammy

#1
Well.....  you can do it with regular bbc image tags, but I prefer (as Admin) using HTML bbc tags and putting regular HTML code inside that.  In order to get the results in the attached screenshot, I did this:

[html]<span style="font-family: Times New Roman; font-size: 18px; font-weight: bold; color: red; margin: 0px 40px 0px 40px;">
<img style="float:left;" src="images/kit.png" border="0" alt="" />
<b><p style="text-align: justify;">This is a test for placing images within news items and for using regular HTML with HTML bbc tags.</p></span><br /><br />[/html]


This allows me to add an image and also format the font, color, etc.  (Of course, all that can be done with regular bbc tags; this just allows me to add some style.)  It needs to be tweaked (i.e., margins); it's pretty rough.  But you get the idea.   :)

In your case, you would float the image to the right.  I've not yet tested within the text.  I'll try it if no one else weighs in.

Grammy

(2nd reply)

Here's a shot with a little Lorem Ipsum (to give enough text for you to see the wrap).  Image is floated to the right in this case:

[html]<span style="font-family: Times New Roman; font-size: 18px; font-weight: bold; color: red; margin: 0px 10px 0px 10px;">
<img style="float:right;" src="images/kit.png" border="0" alt="" />
<b><p style="text-align: justify;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor condimentum ipsum ut iaculis. Aenean id eros et lacus dapibus consectetur. Donec sed risus sit amet est bibendum mattis quis a lectus. Cras at metus id mi fermentum suscipit gravida eu lacus. Sed ultrices consequat tincidunt. Mauris ac pretium libero, non lacinia risus. Ut nisi dui, tincidunt eget lacinia at, interdum vitae turpis. Vivamus venenatis libero orci, id eleifend lacus tincidunt in. Phasellus pretium, neque sed sollicitudin feugiat, libero massa pulvinar metus, eget scelerisque massa nunc vitae dui. Nam sit amet turpis semper, condimentum tortor et, maximus purus. Ut cursus tincidunt dapibus. Praesent et dolor sit amet felis fringilla vulputate. Nam malesuada ex non massa faucibus convallis. Suspendisse in scelerisque magna. Suspendisse ultrices nisl eu diam condimentum elementum.<br /><br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor condimentum ipsum ut iaculis. Aenean id eros et lacus dapibus consectetur. Donec sed risus sit amet est bibendum mattis quis a lectus. Cras at metus id mi fermentum suscipit gravida eu lacus. Sed ultrices consequat tincidunt. Mauris ac pretium libero, non lacinia risus. Ut nisi dui, tincidunt eget lacinia at, interdum vitae turpis. Vivamus venenatis libero orci, id eleifend lacus tincidunt in. Phasellus pretium, neque sed sollicitudin feugiat, libero massa pulvinar metus, eget scelerisque massa nunc vitae dui. Nam sit amet turpis semper, condimentum tortor et, maximus purus. Ut cursus tincidunt dapibus. Praesent et dolor sit amet felis fringilla vulputate. Nam malesuada ex non massa faucibus convallis. Suspendisse in scelerisque magna. Suspendisse ultrices nisl eu diam condimentum elementum.

</p></span><br /><br />[/html]


Grammy

(3rd reply and then I'm done, I promise.)


Check this screenshot out.  I put style tags within the HTML bbc tags and assigned a class to a div.  I'm only mentioning this because it reinforces my suspicion that SMF is awesome.    ;)

[html]<style>.divcen{width:700px; margin-left: 300px; }</style>
<div class="divcen">
<span style="font-family: Times New Roman; font-size: 18px; font-weight: bold; color: red; margin: 0px 10px 0px 10px;">
<img style="float:right;" src="images/kit.png" border="0" alt="" />
<p style="text-align: justify;"><b>You can include style tags within the HTML bbc codes, as if in head tags.  Just sayin'...

</b></p></span></div>[/html]


(Excuse the outdated bold tag.  Just laziness on my part.) 

Okay, I'm done, having way too much fun.   :D

Advertisement: