PHP Help
Author
Discussion

davefowler1987

Original Poster:

183 posts

249 months

Monday 12th April 2010
quotequote all
Evening All - (Don't do long winded)

IE8 please

Website

Press Compatibility Button (Broken Page on address bar)

The page jumps to the right but appears ok when the button is pressed again.

I am a relative newcomer to PHP and have taken overgiven someone elses work - have been through validating everything on W3C but to no avail cannot see why it is not working.

Questions please!

Cheers

sonic_2k_uk

4,008 posts

237 months

Monday 12th April 2010
quotequote all
It's not PHP it's CSS.

Don't you only display the page in compatibility mode if it doesn't work in IE8 though, which it does?

Either way, this should fix it in style.css:

style.css said:
  1. maindiv
{
position: relative;
width: 949px;
text-align:left;
padding-bottom: 50px;
background-color: #fff;
font-size: 1em;
border-right: 1px #c7c8c8 solid;
border-left: 1px #c7c8c8 solid;
border-bottom: 1px #c7c8c8 solid;
float: left;
clear: both;
}

davefowler1987

Original Poster:

183 posts

249 months

Monday 12th April 2010
quotequote all
The issue is the clients are pressing it because it is there - I will try in a bit and let you know

davefowler1987

Original Poster:

183 posts

249 months

Monday 12th April 2010
quotequote all
You my friend are a legend - can you advise as to why that worked if possible - just a learning curve I suppose!

Anytime your near Silverstone - gimme a PM and I'll buy you a beer

sonic_2k_uk

4,008 posts

237 months

Tuesday 13th April 2010
quotequote all
davefowler1987 said:
You my friend are a legend - can you advise as to why that worked if possible - just a learning curve I suppose!

Anytime your near Silverstone - gimme a PM and I'll buy you a beer
You're very welcome.

It's because floating an element left basically stacks it up against the previous element, or if the element doesn't fit into the the available gap it drops it onto a new line.

In compatibility mode it had enough space to line it up next to the header elements, or wasn't being told otherwise, so the clear: both; line just tells the element to float but not on the same line as another element.