13 replies [Last post]
almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

Site is a www.margaretmoodie.com

Problem is vertical spacing between logo and navbar

Firefox 3.6.13 gives desired result, no gap

IE 7.0 shows a gap.

Help please.

 

GenesisMexico.com

if ($p == '101') {
$content = 'services.php';
}
elseif ($p == '102') {
$content = 'customers_products.php';
}
elseif ($p == '103') {
$content = 'location.php';
}
elseif ($p == '104') {
$content = 'information_structure.php';
}
elseif ($p == '105') {
$content = 'contact_us.php';
}
else {
$content = 'home.php';
}

 include "$content";

------------------------------------

/*
genesismexico.com
*/

body
{
margin:0;
padding:0;
border:0;
}

h1,h2,h3,h4,h5,h6
{
font-family: Arial, Serif;
margin: 0;
padding:0;
font-weight: bold;
color: #182c33;
line-height:1.3em;
margin:0.25em 0 0.5em 0;
}
h1 { font-size:2.2em;}
h2 {font-size: 1.6em;}
h3 {font-size: 1.4em;}
h4 {font-size: 1.3em;}
h5 {font-size: 1.2em;}
h6 {font-size: 1.1em;}
p, ol, ul {
margin: 0 0 0.5em 0;
line-height:1.6em;
}

/* Navigation Menu begin ********************************************/

.menu ul
{
width:960px;
margin:0;
padding:0;
list-style:none;
text-transform:uppercase;
font-family:Calibri ,Arial, Serif;
line-height:1.6em;
background:#095ba6;
}

.menu ul li
{
color : #fff;
display : inline;
margin : 0;
padding : 0;
list-style : none;
white-space : nowrap;
background : none;
}

.menu ul li a
{
color:#ccd;
padding:7px 15px 5px 5px;
margin:0;
border:none;
text-decoration:none;
background:url(images/navlink.gif) no-repeat right;
}

.menu ul li a:hover,
.menu ul li a:active,
.menu #rss a:hover,
.menu ul li.current_page_item a
{
color:#fff;
}

/* Navigation Menu end ********************************************/

div.content
{
margin-top: 20px;
background-color:#f1f8fe;
width:900px;
padding:30px;
border:0px;
margin:0px;
margin-bottom: auto;
}

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 6 years 5 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

try validating

try validating..

also, why the heck do you have doctype and style code in the middle of your html??? not right

almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

CupidsToejam wrote: try

CupidsToejam wrote:

try validating..

also, why the heck do you have doctype and style code in the middle of your html??? not right

index.php uses php to "include" the file "home.php, hence the doctype and style code in the middle of the page when you view source at the URL homepage.

All the above happens AFTER my problem gap.

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 6 years 5 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

forgive me, but im not PHP

forgive me, but im not PHP programmer. It is my understanding after building templates for Wordpress, that only one file is to retain all meta and dtd information, not all the includes. Each include should be stripped of everything except the content that goes with it. Feel free to slap me in the face and kick me in the balls if im wrong here.

After validating your code, you would have seen another important piece of code you are missing...character encoding.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 1 day ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2050
Points: 2282

CupidsToejam wrote: forgive

CupidsToejam wrote:

forgive me, but im not PHP programmer. It is my understanding after building templates for Wordpress, that only one file is to retain all meta and dtd information, not all the includes. Each include should be stripped of everything except the content that goes with it. Feel free to slap me in the face and kick me in the balls if im wrong here. ...

No slapping or kicking necessary. You are correct.

almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

CupidsToejam wrote: forgive

CupidsToejam wrote:

forgive me, but im not PHP programmer. It is my understanding after building templates for Wordpress, that only one file is to retain all meta and dtd information, not all the includes. Each include should be stripped of everything except the content that goes with it. Feel free to slap me in the face and kick me in the balls if im wrong here.

After validating your code, you would have seen another important piece of code you are missing...character encoding.

I will remove all meta and dtd info from files to be included, however for the time being I have removed the php include to simplify matters.

I have added the dtd info, now BOTH browsers show the gap between logo and navbar. How do I fix this?

almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

Both the html and the css

Both the html and the css validate but still I get a gap with IE but not Firefox, why?

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 1 day ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2050
Points: 2282

almoodie wrote: Both the html

almoodie wrote:

Both the html and the css validate but still I get a gap with IE but not Firefox, why?

I see no space using both IE and FF.

almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

Verschwindende

Verschwindende wrote:
almoodie wrote:

Both the html and the css validate but still I get a gap with IE but not Firefox, why?

I see no space using both IE and FF.

For me IE 7.0.5730.13 shows a gray gap between the white of the logo and the blue of the navbar.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 4 years 13 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Give the image display:

Give the image display: block;

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 1 day ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2050
Points: 2282

Deuce wrote: Give the image

Deuce wrote:

Give the image display: block;

Ah, the descender space?

almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

Deuce wrote: Give the image

Deuce wrote:

Give the image display: block;

I now have

<img src="images/logo.jpg" width="960" height="180" alt="" border="0" style="  display: block;"/>

makes no difference, but thanks for trying, I have been at this for 3 hours now.

almoodie
almoodie's picture
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT-5
Joined: 2011-01-24
Posts: 7
Points: 8

Problem solved, used a

Problem solved, used a different character encoding.

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 6 years 5 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

character encoding, I have a

character encoding, I have a feeling of Déjà vu