Jump to content

Image WILL NOT align to the right?!


MBrown

Recommended Posts

I'm well.. really kicking myself at the moment.

I've been trying all morning now to get an image to align to the very right of a header.

But no matter what I do it won't do what I want. It either gets inserted between the login boxes or it wrecks all the style up I can't figure it out :angry:

I've tried adding tables, containers. While I'm not a PHP expert I try my best but somethings like this I could use a bit of help with please!

The below image is "photoshopped" of how I want it to look like:

sp9e69.png

It's the orange sticker to the very right that is a .png located within my skin folder.

And I presume that to do the above it's all through layout.tpl below is the current code so hopefully someone might be able to help!

Link to comment
Share on other sites

Thanks for the tip, don't forget I'm not completely php pro level...

I get most of it, but the laying it out not entirely sure what to add or where exactly to the above code...

So the image would be www.mysite.com/images/image1.png

I can start it but not sure how to end it :D

</div>
</div>

Many thanks for your help again, thanks for your time!

Link to comment
Share on other sites

Well this is a CSS matter not entirely php.... you can start like this:

<div id="top-container">
<div class="login-box"></div>
<div class="image-box"></div>
</div>

Now as for the styling you can try:

#top-container{
width:500px;
clear:left;
float:right;
}
#top-container.login-box{
float:left
width:300px;
}
#top-container.image-box{
width:200px;
float:right;
}

Keep in mind this is a mock up, i have not done any test on it yet... Give some Feedback. This is also just one way of completing your goal of the many ways you can take.

Link to comment
Share on other sites

Well, I probably haven't done it correctly you can see the result at: www.iberworldva.com

Looks like it's aligned to the right but everything else is messed up now.

I did have to change a few things in the code maybe why.

Added the styling to the .css and the rest to the layout.tpl

Link to comment
Share on other sites

Your site seems to be offline right now, but I took your code and made a jsfiddle so you could see what I did to make it work:

http://jsfiddle.net/tutmeister/j7V93/10/

Basically, you need a clearing div underneath the two div's that are floated left and right. I also solved the repeating background on your white header and a few other issues I saw. Let me know if you need anymore help with it.

Link to comment
Share on other sites

Many thanks for your time and patience to try all that for me tutmeister.

Although must have done something wrong there :S

I added the parts that you changed but strangely it's not aligning to the right still.

www.iberworldva.com

Wonder why that is :S Obviously I added them respectively to style.css and layout.tpl

Tricky tricky

EDIT: using jfiddle I copied in exactly what I have in layout and stlye from my site and pasted it and replaced what was in jfiddle, now it shows fine on there to the right yet having the exact same things my site still doesnt do it properly. How strange is that.

There is another .css file only one more but can't see anything there that would effect it?

EDIT2: False alarm, it appears to be fine now to the right. Just have to get the login stuff all reordered I suppose now, and another tiny thing when you are eventually logged in, there is nothing up there except the orange sticker and the logo all the "once you are logged in" items vanish :S

EDIT3: Forget the above, just fixed that problem. Something wasn't right with authorizations. Now all that's left is to align the two links when you're not logged in. :S

EDIT4: Works great just aligned them, BUT when you login now it completely throws the page about as per this photo: http://i49.tinypic.com/2wnboqq.png

Why I wonder? Will take a look see if I can work it out.

EDIT5: Ok, done at last thank you so much so very helpful without your input wouldn't have been able to do it I think haha :D +1

Now gonna see if I can just reduce the space between the banner and the top. So not too much white.

Managed to add another image by adding image box 2 to the css but now it's sort of squeezed the login boxes to the very left:/ WOuld be nice if I couldhave that to the right abit more. Have tried aligning it but not working :S

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...