You are here: Re: CSS layout dilemma « HTML « IT news, forums, messages
Re: CSS layout dilemma

Posted by Eirik Eldorsen on 08/03/05 15:54

IE and Firefox does not render DIVs with width the same way.

Put this in the top of your html file to fix this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

This will force the browsers to behave more alike.


--
Eirik Eldorsen


"Dave Smey" <dsmeywithoutspam@mindspring.com> skrev i melding
news:T50Ie.59$RZ2.14@newsread3.news.atl.earthlink.net...
> Hello,
>
> I'm hoping someone can help with a CSS layout problem that I keep running
> into. I want to make a series of vertically stacked boxes of fixed width
> but flexible length. Inside the box are two columns, again with fixed
> width
> but flexible length.
>
> I've even made a dopey diagram to help you visualize...
> http://www.davesmey.com/example.jpg
>
> Here is my CSS
>
> #eventbox {width: 575px; background-color: #FFFFFF; border-width: 2px;
> border-top-style: solid; clear: left;}
> #infobox {width: 340px; float: left; background-color: #FFFFFF;
> padding-left:10px; padding-right:10px; padding-top: 10px}
> #photobox {width: 205px; float: right; background-color: #FFFFFF;
> padding-right:10px;}
>
> And each box is basically
>
> <div id="eventbox">
> <div id="infobox">
> <!-- infobox content -->
> </div>
> <div id="photobox">
> <!-- an image, a caption -->
> </div>
> </div>
>
> Works with IE, but not completely with Firefox - the white background does
> not fill in the blank spaces around infobox and photobox. I always end up
> solving the problem by enclosing everything in a bigger box.
>
> Why doesn't it work with Firefox? Am I doing it wrong or is Firefox
> wrong?
>
> Thanks,
> Dave Smey
> Brooklyn, NY
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация