You are here: Newbie question re CSS margins in IE « HTML « IT news, forums, messages
Newbie question re CSS margins in IE

Posted by damiensawyer@yahoo.com.au on 03/08/06 07:39

Hi,

I'm wondering if someone could help me with the peculiarities of CSS
within IE. I wish to create a <DIV> in the stylesheet that has a fixed
left and right margin (100px from the left of the window and 10px from
the right). This works fine in Firefox, however fails in IE if I don't
have 'enough' text inside the div - by enough, it appears that if the
text doesn't wrap over the whole line, then the 'box' difined by the
DIV doesn't cover the fufl width that I want.

Can someone please point me in the direction of a workaround? I've
tried to give a full working example of the issue below.

Thanks in advance,



Damien Sawyer



<html>
<head>
<style>
body
{
font-family:Verdana;
Font-Size:0.8em;
}

..myDiv
{
border-width:1px;
border-style:solid;
border-color: black;
position:absolute;
left:100px;
right:10px;
height:100%;
}
</style>

</head>
<body>
<p>I want the div to position accordng to the left and right settings
in the style. It works
fine for Firefox, however, in IE only works when there is more than
"one lines" worth
of text in there. I need it to fill the screen when there is no text.
</p>
<p>Any ideas?</p>
<div class="myDiv">
Sample text inside div
</div>

</body>
</html>

 

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

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