Jump to content

[solved] Add This Kind Of Box On Top


Recommended Posts

Hi,

I'd create a simple html box in a module (maybe with some rich text editor for the content)

 

Hook it to "displayTop", then set a fixed with for the bos. Use thisn kind of css:

 

position: absolute;

left:50%;

top:0;

margin-left: -(enter half of the element's width here)

width: some width you want

 

It should do it. You can also hardcode it if you don't know how to create a module, It's just plain html and css at that point

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

I don't seem to be able to figure it out.

 

I have my image (353x90) i want it adjusted on the top:center of all pages. Could you do a steb-by-step guide on how to do this? I've located the header.tpl added the code, but it messes up the logo on top left, and other codes such as the navigation menu...

 

Please, Thank You!

Link to comment
Share on other sites

sometimes the position depends on your theme construction.

so my question is: you use default template?

and another one: your website is online? If so - please paste the url, im convinced that it will be really helpfull here

Link to comment
Share on other sites

hello

 

thanks

 

I checked your website and created a code:

<div style="display:block; position:absolute; width:300px; height:70px; background:yellow; top:10px;left:340px;">test</div>

 

insert it into the header.tpl file

right after the div id=header, and before the <a id="header_logo"> exactly as i show below:

 

gMOLPDw.png

 

 

effect:

 

IUBwsXl.png

 

 

 

of course you can create own styles like border-radius, font size color etc.

Link to comment
Share on other sites

Ah, that's perfect if I'm putting HTML text, but what if I already have an image? I simply need to put an actual photo/image in that spot - a 300 x 70 image. A premade image I did in Photoshop and uploaded to my server, once I put that image up in that space it'll be a link....

Link to comment
Share on other sites

that isn't problem, to the:

<div style="display:block; position:absolute; width:300px; height:70px; top:10px;left:340px;"></div>

 

add own image <a href="YOUR_URL"><img src="URL_TO_IMAGE" /></a>

 

don't forget about width & height change (for div block)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...