MyBB Community Forums

Full Version: Images on the same line?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having a HTML related error.

I'm placing 2 images in the header, and I want them to be beside each other like this:

------ ------
| | |
| img | img |
| 1 | 2 |
------ -------

But this is what it does instead:

------
| |
| img |
| 1 |
------
| |
| img |
| 2 |
------

They are perfectly sized to fit in the header, but the code just won't make it work. Anyone know? Suggestions are welcome as well.

Thanks! Smile
Paste the code you're trying to use ?
Ok, here:

<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="http://i33.tinypic.com/14tnb80.jpg" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>

<div align="right"><a href="http://www.twitter.com/foradvertise"><img src="http://i36.tinypic.com/34fllqe.jpg" alt="FA Twitter" title="FA Twitter" /></a></div>

That's the problem!
Use this:

<div style="float: right;"><a href="http://www.twitter.com/foradvertise"><img src="http://i36.tinypic.com/34fllqe.jpg" alt="FA Twitter" title="FA Twitter" /></a></div>

<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="http://i33.tinypic.com/14tnb80.jpg" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>

That should work Smile
Take a look:

http://www.foradvertise.mybbnew.com/

It's there, but not in the place it should be in.
You didnt put the code on your site how I said. The twitter logo has to be put first when using the float: right; CSS attribute.

<div style="float: right;"><a href="http://www.twitter.com/foradvertise"><img src="http://i36.tinypic.com/34fllqe.jpg" alt="FA Twitter" title="FA Twitter" /></a></div>

<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="http://i33.tinypic.com/14tnb80.jpg" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
Thanks! That did it!
Big Grin