If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Can links sit on top of my logo header?

Can links sit on top of my logo header?

Locked

Started by oneposhshop on 15 May 2007, 5:59 AM · Views: 4,277

Results 1 to 20 of 29
This thread is locked. New replies are disabled.
15 May 2007, 5:59 AM
#1
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Can links sit on top of my logo header?

I feel bad start a new thread about this but I've searched "hi and lo" for a clear answer and due to my own ignorance I can't seem to understand the solution for any of the other posts so here is my problem:

As you can see on my site:http://oneposhshop.com/Shop the logo.gif image should have several links in it for various pages in my site. (contact us, blog, shopping cart, home) I read in several places that this effect can be acheived through transparent images (whatever that means?) and image maps. In a few places I saw the suggestion to > do a google search for image maps which I did but of course had no idea what exactly I was looking for and also found no suggestions of where I was meant to place the information back in zcart.

I even went so far as to slice the image in a graphics program but I don't know where to insert the image slices into the code.

Any suggestions would be tremendously appreciated!

Thanks,

Rochel

15 May 2007, 7:00 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

I'm glad to see you've got your site back in relative (if not absolute;) order.
For the situation you have, I believe your best bet will be to simplify and consolidate the header area.

Instead of trying to get the round corner images and logo image to cooperate, put them all together in a graphics program as one image the full size of the header. You can tweak until it looks perfect, since you are not trying to get a flexible layout.

Use this image as the #headerWrapper background, with a height and width specified for #headerWrapper. The navbar can go in the top of headerWrapper with transparent background, and the links can each be a free-floating div absolutely positioned inside headerWrapper.
Fewer elements, less complication.

15 May 2007, 2:00 PM
#3
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

gjh42:

Instead of trying to get the round corner images and logo image to cooperate, put them all together in a graphics program as one image the full size of the header.

Actually, those corners which you see near the header are a "fluke". I've temporarily postponed trying to fix the corner issue (the corners are meant to be the four corners of the entire purple area) until the header and footer where arranged properly. The question was referring to the home, contact us, blog, and shopping bag links which I want to be individual links but since I don't know how to acheive that affect I placed them in the logo.gif image to illustrate the look I was going for.

Back to your suggestion, I''m wondering whether this would still help me: > gjh42:

Use this image as the #headerWrapper background, with a height and width specified for #headerWrapper. The navbar can go in the top of headerWrapper with transparent background, and the links can each be a free-floating div absolutely positioned inside headerWrapper.
Fewer elements, less complication.

Sounds simple, (I think :wink: ) but how exactly do I make the links > gjh42:

each a free-floating div absolutely positioned inside headerWrapper.

Thanks for all of your help and patience,

Rochel

15 May 2007, 5:26 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Ahhh... it helps to know the overall plan. Putting transparent round corners on a solid purple background so the pink background shows through is never going to work. It will be possible to get the effect you want, but you must start in a different way.

First off, you can can the round* divs completely. I will be assuming that you want the purple area to stay the width it is now - floating width would make it much more complicated. You can't put the purple background in #mainWrapper, it will go in an inner wrapper. Give

#mainWrapper {
	width: 940px;
	margin:auto;
	margin-top:23px;
	margin-bottom:23px;
	padding-bottom: 50px;
	position: relative;
	background-color: transparent;
	background-image: url(../Images/bl_bg.gif);
	background-position: bottom center;
	background-repeat: no-repeat;
	text-align: left;
	vertical-align: top;
	}

Edit bl_bg.gif to have solid purple between the corners, and make it the width that is going to work given the sidebar and image you are containing and the spacing you want (940px or whatever - make all consistent).

Note - is your template images folder really named /Images/? It would be better for the long run to rename it /images/ and change the few references you have now accordingly. Capitals in file/folder names are a great source of inexplicable errors, as it is so easy to forget to capitalize a word once in a while. Best to stick with standards unless there is a compelling reason not to.

Now, you will have a transparent box with a purple round bottom. Next come upper and middle sections to fill it.

15 May 2007, 7:08 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Put the round top and logo images together with purple filling into one image that looks exactly like you want the whole top/header area to be. Maybe change the filename to header_bg.gif.
You can leave off the link graphics, as it will be easier to position them later with the link divs.
Style the header:

#headerWrapper {
	width: 940px;
	height: 250px;
	background-image: url(../Images/header_bg.gif);
	position: relative;
	}
``` Make h & w match the background image size.

Now for #contentMainWrapper: ```
#contentMainWrapper { /*controls trois soeurs picture container*/
	width: 100%;
	position: relative;
	background-color: #711C4F;
	}

And the sidebar: ```
#navColumnOne {
background: url(../Images/menu_background_switched_skinny.gif);
background-position: top center;
background-repeat: no-repeat;
height: 1200px; /or whatever the bg image needs/
padding-top: 68px; /gives space above bag images/
padding-bottom: 44px; /gives space below bag images/
padding-left: 16px;/gives space for Shop Posh bg/
padding-right: 16px;
margin-top: -50px; /controls how high the menu background image is/
margin-left: 30px;
}

Note - the whole 

	padding-top: 68px; /*gives space above bag images*/
	padding-bottom: 44px; /*gives space below bag images*/
	padding-left: 16px;/*gives space for Shop Posh bg - adjust as reqd*/
	padding-right: 16px;

can be condensed into

padding: 68px 16px 44px 16px;

Get rid of all the table stuff inside navColumnOne. All you need is the divs with their link images. Put them *inside* navColumnOneWrapper, and code them each like this: ```php
<div class="shopposh"><a href="http://oneposhshop.com/Shop/index.php?main_page=index&cPath=1"><img src="http://oneposhshop.com/Shop/includes/templates/Posh_by_Trois_Soeurs/Images/Dresses_shopping_bag.gif" ></a></div>
``` and style .shopposh: ```
.shopposh {
	width: 79px;
	height:95px;
	text-align: center;
	padding-top: 5px;
	}
``` You can also just make sure all the bag images are the same size and eliminate the width, height and text-align: center; and let the images give size to the shopposh divs.
15 May 2007, 7:10 PM
#6
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

but what about the original problem about the logo (the reason that I opened this thread) I want some links to sit ontop of the logo. how do I do that?

15 May 2007, 7:15 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Work on this and then get back with your results; then we'll go into the header links (oh yeah... that's all you asked about in your OP :)

The header links can't effectively be positioned until the underlying structure is rationalized.

15 May 2007, 10:10 PM
#9
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

gjh42:

First off, you can can the round* divs completely.
Are you referring to this part of the css?

.roundcont {
    width: 974px; /*purple square width*/
    height: 1090px; /*purple square height*/
    position: relative;
    left: 154px; /*effects logo and corner position also home and login*/
    background-color: #711C4F;
}

.roundcont p {
    margin: 0 0px;
}

.roundtop {
    background: url('.../Posh_by_Trois_Soeurs/Images/tr_bg.gif') no-repeat top right; 
    width: 940px;
    position: relative;
    left: -4px;
    top: -2px;
}

.roundbottom {
    background: url('.../Posh_by_Trois_Soeurs/Images/br_bg.gif') no-repeat top right; 
    width: 940px;
    position: relative;
    left: -4px;
}

img.corner {
   width: 80px;
   height: 79px;
   border: none;
   display: block !important;
}
```> You can't put the purple background in #mainWrapper, it will go in an inner wrapper.As far as I can tell, the purple background wasn't in the #mainWrapper, it was in ".roundcont "

> You can't put the purple background in #mainWrapper, it will go in an inner wrapper. **Give**Am I missing something here or was that a typo? Give what?

> Edit bl_bg.gif to have solid purple between the cornersThis image file only contains the bottom left corner. I copied and edited this code from <http://kalsey.com/blog/2003/07/rounded_corners_in_css/> as suggested by  jettrue in in this thread: <http://www.zen-cart.com/forum/showpost.php?p=370593&postcount=600>

I hate to sound like a dummy but I guess it's difficult to hide the truth:wink::blush:
15 May 2007, 10:27 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Wherever the purple was, it needs to go in contentMainWrapper.

The "Give" was meant to lead into the #mainWrapper declaration, but it doesn't look so clear the way it ended up on the page.

Both bottom corner images are contained in one div... when you say they are separate, I understand now that one must be a background pinned to the right and one is an image on the left. Be that as it may, your page layout does not require flexible width, so it will be easier to put both corners with the purple between them into one image and position that at the bottom as a background.

And for the roundconts, I meant not just the css, but actually removing all the roundcont divs from the php file.

15 May 2007, 10:53 PM
#11
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

Hi Glenn,

Thanks for your extreme patience in your explanations. So far I have fixed the table issue in the left menu in navcolumnone and deleted all evidence of the roundcont. both in css and php files. I switched the purple background into the contentMainWrapper but I notice two issues.

  1. the logo gets clipped on the bottom
  2. the purple is wider than the logo's purple background.

to fix #1 do I just move the background down by changing the ```
padding-top: 35px;


how would I fix  #2?
15 May 2007, 11:12 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

You haven't changed all the wrapper css declarations yet. Until you do all the things I listed, things won't look quite right.

You need to remove the logo image from the logo div and just leave it as the headerWrapper background. Later, you can make a "logo" link area if you want, using a transparent 1-pixel image as a placeholder.
The headerWrapper currently is defined as 100px high, and is being forced open by the 230px image in the logo.

contentMainWrapper is likewise being forced open by the images inside it plus their margins. You may need to make #mainWrapper and all elements with defined width a bit wider.

I have to leave now, so keep up the good work and I'll look in when I can, probably late tonight.

16 May 2007, 4:46 AM
#13
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

Well, :clap: (pretend that's a standing ovation) aside from the fact that I'm so excited to have gotten this whole thing taken care of I'm REALLY impressed by your patience (I'm a teacher so that's a big complement) and I'm touched that you took the time to figure it all out and then explain it to me, I know that time isn't disposable and you've given me lots of yours! :cheers:

Thanks a bunch!

Now I think I'm ready for those header links

16 May 2007, 7:28 AM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Way to go! You're looking good there.

The header links will actually go into tpl_header.php just about like the shopping bag image links. Put them between <!--eof-navigation display--> and <!--bof-branding display-->. Give each one its own id instead of all being class shopposh.

  <div id="headerLinkOne"><a href="http://oneposhshop.com/Shop/index.php?main_page=index&cPath=1"><img src="http://oneposhshop.com/Shop/includes/templates/Posh_by_Trois_Soeurs/Images/Dresses_shopping_bag.gif" ></a></div>  

In your stylesheet, style each id: ```
#headerLinkOne {
position: absolute;
left: 123px;
top: 175px;
}

16 May 2007, 3:40 PM
#15
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

Ok I got it! YAY!:D Now one last question (I hope:wink:), If you notice the top rounded background has a darker purple border as does the bottom. The only place that border is missing is in the middle. can I insert a picture into the #contentMainWrapper instead of just having the purple background? would that make it a continuous border?

16 May 2007, 4:27 PM
#16
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

That would work - a 10px high x 940 or whatever px wide background-image with background-repeat: repeat-y; would do it.

Even easier, you could just specify a left & right border for #contentMainWrapper:```
{ /controls trois soeurs picture container/
width: 100%;
position: relative;
background-color: #711C4F;
border-left: 2px solid #xxxxxx;//whatever color the border needs
border-right: 2px solid #xxxxxx;
}

16 May 2007, 4:58 PM
#17
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

A couple more minor tweaks that will help neaten up the page:

Text & form boxes in the center column extend all the way to the right edge. Give them some breathing room:

.centerColumn {margin-right: 20px;}

I was glad to see that you now have the main content expanding the height of the box (Policies was overrunning before), but navColumnOne is still too bulky.
Now that it has bag images & padding to keep it open, you can safely delete height from #navColumnOne.

BTW, your "Posh Policies" are wonderful! They show the kind of attitude that will make people want to explore and come back.

17 May 2007, 2:19 AM
#18
oneposhshop avatar

oneposhshop

New Zenner

Join Date:
Apr 2007
Posts:
53
Plugin Contributions:
0

Re: Can links sit on top of my logo header?

gjh42:

Text & form boxes in the center column extend all the way to the right edge. Give them some breathing room:

.centerColumn {margin-right: 20px;}

I did a search for .centercolumn in the css sheet but didn't find it :blush: so I'm not sure where to place that correction.

Also as far as the borders go, I had thought of that idea but had nixed it because it doesn't seem to line up correctly on the right side at the bottom so I think I'll just use the image solution and hopefully that will work.

One other issue is the transparent placeholder image which I inserted but obviously not in the correct place and I downloaded the mozilla plugin to view the css and other details of the elements in the page and couldn't find any reference to where I had placed it to try and figure out how to move it over. But when I viewed the site in IE it showed the image icon slightly to the left of the home link next to "MyPosh"

Here's the code for where I placed it in the php file:

<div id="headerWrapper"><a href="http://oneposhshop.com/Shop/"><img src="" alt="" width="1" height="1" border="0"></a> 
  <!--bof-navigation display-->
```Thanks again for all your help and all for a total stranger !:cool:
17 May 2007, 3:52 AM
#19
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Just add the whole line to your stylesheet.

.centerColumn {margin-right: 20px;}

There are many class/id tags built into the code just waiting for someone to have a need to style that particular element...

17 May 2007, 4:01 AM
#20
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Can links sit on top of my logo header?

Ran out of time to add to my post...

There's no point in having an invisible link just sitting at the beginning of headerWrapper. My suggestion was for it as a placeholder inside the logo link. I would say to just delete the one you show.

Also, now that you are done with editing (for now;), it would be good to delete all the obsolete commented-out stylesheet declarations to make it cleaner. They do take up bandwidth when your site is being viewed, and every little bit helps.