Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header.php


Guest

Recommended Posts

Hi,

 

I have tried to add a new heading in header.php, and it goes onto the page, but it won't align itself with the rest of the headings. Instead of sitting to the right of the rest of them (where there appears to be pleanty of space), It jumps below and sits underneath, left alligned.

 

http://www.morlayne.co.uk/index.php

 

Please Help,

 

Thanks.

Link to comment
Share on other sites

go to stylesheet.css and find:

 

#navdiv {
width:550px;
margin: 0 0 5px 0;
height:22px;
background:#4C2165;
}

 

try to change the width, maybe this is causing problem

Link to comment
Share on other sites

go to stylesheet.css and find:

 

#navdiv {
width:550px;
margin: 0 0 5px 0;
height:22px;
background:#4C2165;
}

 

try to change the width, maybe this is causing problem

 

 

Thank you for your suggestion, I have tried changing the 550px to 800px and 100%, and neither made any difference at all - any other ideas?

 

Thank you

Link to comment
Share on other sites

You should also increase the size of the table cell containing the navdir...

 

<td class="header" width="585" align="left" valign="middle" height="22">

Link to comment
Share on other sites

You should also increase the size of the table cell containing the navdir...

 

<td class="header" width="585" align="left" valign="middle" height="22">

 

 

Is the code above in header.php?

I've changed the width there and in the style sheet to 800 and yet it seems to have no affect!?! :huh:

 

What next???

 

Thanks so much for your help

Link to comment
Share on other sites

For testing it is good to add a border to the table and the divs, it gives you more insight where your styling is going wrong.

 

Yeah that's right, it's where the 'contact us' jumps down.

 

Adding a border sounds like a good plan, do I have to do that in stylesheet.css and header.php?

Link to comment
Share on other sites

I would first try to hard code it in the header:

 

<td class="header" width="585" align="left" valign="middle" height="22" style="border:1px solid #000000;">

 

and to the ul border:1px solid #ff0000;

Link to comment
Share on other sites

I would first try to hard code it in the header:

 

<td class="header" width="585" align="left" valign="middle" height="22" style="border:1px solid #000000;">

 

and to the ul border:1px solid #ff0000;

 

Just done that, as you can see, once again doesn't seem to have done anything. I put "the ul border:1px solid #ff0000;" in stylesheet, here:

 

}
#nav ul {
margin:0;
padding:0;
list-style:none;
border:1px solid #ff0000;

 

And the extra bit in header.php like you said. Is this what you meant?

Link to comment
Share on other sites

I downloaded your index.php and stylesheet.css pages. In the stylesheet I changed:

 

#navdiv {
width:550px;
margin: 0 0 5px 0;
height:22px;
background:#4C2165;
}

 

To:

#navdiv {
width:700px;
margin: 0 0 5px 0;
height:22px;
background:#4C2165;
}

 

Also added width to the ul as follows:

#nav ul {
margin:0;
padding:0;
list-style:none;
width: 700px;
}

 

After this change the contact us was in line with the other links. Be sure to edit the right stylesheet.css...

Link to comment
Share on other sites

I downloaded your index.php and stylesheet.css pages. In the stylesheet I changed:

 

#navdiv {
width:550px;
margin: 0 0 5px 0;
height:22px;
background:#4C2165;
}

 

To:

#navdiv {
width:700px;
margin: 0 0 5px 0;
height:22px;
background:#4C2165;
}

 

Also added width to the ul as follows:

#nav ul {
margin:0;
padding:0;
list-style:none;
width: 700px;
}

 

After this change the contact us was in line with the other links. Be sure to edit the right stylesheet.css...

 

Ahh, I've been editing public_html/includes/stylesheet.css - is this not correct? I can't find another stylesheet.css in smart ftp, other than public_html/admin/includes/stylesheet.css.

 

Where do I find catalog/stylesheet.css as you suggested it should be?

 

Thanks so much for your help, we'll get there in the end :thumbsup:

Link to comment
Share on other sites

In your root directory... :P

 

Finally, I think I've got it!! Have a look, what do you reckon? Thanks so much for your help,

 

Cheers,

 

James

 

:lol: :thumbsup: :lol: :thumbsup: :lol:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...