View Full Version : Add image to description of forum
MuSuL
09-02-2009, 02:29 AM
So on forum home, I'd like to add and image to the right of the forum name but on the same level as the name and not one line down as where I'm stuck now.
This is the text I have
<div align="right" width="100%"><img src="logos/4ever.png"></div>
It aligns correctly to the right of the cell for that forum but it is one line down. How do I get it all on one line?
Lynne
09-02-2009, 02:38 AM
Take out the width and see if you still have the same problem. (Also, img tags require the alt attribute and you should close it - <img src="xxxx" alt="yyyy" /> .)
MuSuL
09-02-2009, 02:46 AM
If I take out the width, it goes right under the forum name. Added an alt.
MuSuL
09-02-2009, 02:49 AM
Here is what I mean.
The 4ever fit logo should be on the same level as the forum name, flush to the top of the cell.
Lynne
09-02-2009, 03:47 AM
Do you have firebug for firefox? You can modify the css in the window and figure out the correct way to do it then. I don't think a width of 100% is what you want. I'd guess you want to float the div right and then set the width to just the width of the image.
MuSuL
09-02-2009, 03:58 AM
div of 100% should give me the full size of the cell. It's working on both browsers so I think it's doing what it should. The problem is that even if I just insert an img without the div, it will show up beneath the forum name. That means somewhere in the code, there is an element that forces a line feed. I need to "break" out of that and go back up to the same level of the forum name.
Lynne
09-02-2009, 04:05 AM
If you want it on the same 'level' as the other element (the name), you need to float it right. Did you do that?
MuSuL
09-02-2009, 04:05 AM
let me try
--------------- Added 1251868229 at 1251868229 ---------------
<div style="float: right;"><img src="logos/4ever.png" alt="4everfit"></div>
Ended up getting the exact same affect. It's to the right of the cell as I need but still lower than the div of the forum name :(
--------------- Added 1251868620 at 1251868620 ---------------
<div style="float: right;"><img src="logos/4ever.png" alt="4everfit"></div>
Ended up getting the exact same affect. It's to the right of the cell as I need but still lower than the div of the forum name
Lynne
09-02-2009, 04:19 AM
You need to put something that you mean to float right before the thing you mean to float left. Did you do that? So, the image needs to be in the code before the forum name.
You may want to google image positioning using css.
MuSuL
09-02-2009, 04:22 AM
Thanks, will research it.
Brother Malachi
09-02-2009, 10:23 PM
Why not simply use <img src="blah" style="float:right;" width="" height="" boder="0" /> ?
With the <div> tag you must specify a width before using float, otherwise its width defaults to all of the available space and it doesn't fit in with the text ;)
MuSuL
09-03-2009, 09:10 AM
Still outputs one line down. To the right works well but can't get it on the same level as the forum name text.
Lynne
09-03-2009, 03:05 PM
Please post the exact code you have in your template if you want help. Simply saying it doesn't work doesn't tell us a thing. We will need the entire code for that column in order to see what is going on.
MuSuL
09-03-2009, 10:21 PM
Latest code is as Brother Malachi posted.
Just to make sure we are not misunderstanding, I am NOT touching any templates. I am doing this in the admin cp under the forum description. Where you enter title of forum, discription, parent forum..etc. I'm placing the code in the description part as that's where I figured this stuff should be done.
Lynne
09-04-2009, 01:09 AM
I don't know that you can do it that way since you need to float the description left also. Maybe put a <div> around the description also and float it left? I don't know if that will work though. (Don't forget you need to put the object you are floating right, before the object you float left.)
MuSuL
09-04-2009, 06:43 AM
It worked!!! I didn't think of that. I did as you said, I added a div tag around the name of the forum in the admin cp and floated it left and used the img tag, gave it a style=float:right and tada, it works fine.
Thanks Lynne :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.