please see http://dreamtech.awardspace.co.uk/ in IE 7 or firefox 3.0.6 - it displays fine. but in IE6, the 2 columns on the page display one below the other. i assume its something to do with the css. can you help me?
the css files are and

also the page had a line <?xml version="1.0" encoding="utf-8"?> right at the top which i had to remove because it showed the error "Parse error: syntax error, unexpected T_STRING in /home/www/ on line 1" when i hosted it on awardspace. does this have any impact on my problem. if i remove this line, do i have to add some other line to my code to make it proper.
thanks for your time and efforts.

Dani AI

Generated

Two things were at play: the layout actually hit the available width, and IE6’s quirks made the floated column wrap. was right to point toward cumulative widths; resolved it by reducing and equalizing the inner horizontal padding so the summed width fit the column container (that change removed the overflow that forced the second column down).

Why that happens: when a floated column’s declared width plus its padding/border/margin exceeds the parent’s usable width the float drops. Older IE also shows float/margin and “hasLayout” quirks that can make wrapping more likely. References that explain these behaviors are available at QuirksMode and MDN:

Practical fixes that are safe to apply without changing markup:

  • Ensure the sum of width + left/right padding + borders + margins does not exceed the parent width (reduce padding or width, or move padding to an inner wrapper).
  • For IE6-specific float issues, trigger hasLayout and prevent the double-margin bug. Example CSS (apply only to IE6 via conditional comments if desired):
/* apply only for IE6 via conditional comment */
.col {
  float: left;
  display: inline; /* stops IE6 doubling margin on floats */
  zoom: 1;         /* gives element hasLayout in IE6/7 */
}

The PHP parse error mentioned earlier was caused by an XML prolog starting with <?xml being treated as a PHP opening tag when short_open_tag is enabled on the server. The PHP manual explains short/open-tag behavior and why removing the prolog from HTML pages is the simplest fix: PHP phptags documentation.

Recommended Answers

All 2 Replies

The xml line is not necessary, and causes errors on some browsers.

Look for styles containing both a size style (width, height) and a nonzero surrounding style (margin,. border, padding). These can make things wider than 100 percent, causing the column to go down.

Look for anything wider than the page.

Check the page for W3C validation.

commented: very usefull info +1

thank you for your help. the problem was in style.css. i changed the line #page3 #content .col_1 .indent { padding:0 60px 0 28px;} to #page3 #content .col_1 .indent { padding:0 25px 0 25px;} and it worked fine

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.