Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > ok last question i promise

Reply
Thread Tools

ok last question i promise

 
 
Paul Watt
Guest
Posts: n/a
 
      04-05-2006
Hi,
Ok, I've solved most of the layout issues I was having with the template I'm
building and it looks ok in both IE and FF.
One thing remains though and its driving me nuts. I've got two divs's
displayed next too each other to make two cols, the left hand div set at a
width of 250px, the right hand div no width set.
In FF the right div starts at the edge of the left div and displays
correctly, however in IE the right div starts at the edge of the page
(although the text in the div starts at the edge of the left div).

So If i set margin-left on the maincontent div to 255px in IE it sits where
I want, but in FF it sits 255px away from the left div which just looks
wrong.

The URL is: http://www.paulwatt.info/test/turn/ .
and http://www.paulwatt.info/test/turn/css/turnlayout.css

I've been searching google and I cant find a answer. I suspect that FF is
behaving properly and IE is doing its usual thing.

many thanks in advance

Paul
--
http://www.paulwatt.info


 
Reply With Quote
 
 
 
 
Noozer
Guest
Posts: n/a
 
      04-05-2006

"Paul Watt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> Ok, I've solved most of the layout issues I was having with the template
> I'm building and it looks ok in both IE and FF.
> One thing remains though and its driving me nuts. I've got two divs's
> displayed next too each other to make two cols, the left hand div set at a
> width of 250px, the right hand div no width set.
> In FF the right div starts at the edge of the left div and displays
> correctly, however in IE the right div starts at the edge of the page
> (although the text in the div starts at the edge of the left div).
>
> So If i set margin-left on the maincontent div to 255px in IE it sits
> where I want, but in FF it sits 255px away from the left div which just
> looks wrong.


Because "leftcell" is floated, it's not counted when placing the
"maincontent" div.

I think both browsers have it wrong...

Firefox, because it's not truly floating the "leftcell" div.

IE, because it takes into account the foated div, but then doesn't apply the
content based on it.

Try sqashing your browsers narrower and you'll see IE starts wrapping the
content at the left margin.


 
Reply With Quote
 
 
 
 
Tony
Guest
Posts: n/a
 
      04-05-2006
Paul Watt wrote:
> Hi,
> Ok, I've solved most of the layout issues I was having with the template I'm
> building and it looks ok in both IE and FF.
> One thing remains though and its driving me nuts. I've got two divs's
> displayed next too each other to make two cols, the left hand div set at a
> width of 250px, the right hand div no width set.
> In FF the right div starts at the edge of the left div and displays
> correctly, however in IE the right div starts at the edge of the page
> (although the text in the div starts at the edge of the left div).
>
> So If i set margin-left on the maincontent div to 255px in IE it sits where
> I want, but in FF it sits 255px away from the left div which just looks
> wrong.
>
> The URL is: http://www.paulwatt.info/test/turn/ .
> and http://www.paulwatt.info/test/turn/css/turnlayout.css
>


..leftcell{
margin-top:5px;
width: 250px;
position: absolute;
}

Look into FLOAT, and lose position:absolute
 
Reply With Quote
 
Paul Watt
Guest
Posts: n/a
 
      04-05-2006

"Tony" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Paul Watt wrote:
>> Hi,
>> Ok, I've solved most of the layout issues I was having with the template
>> I'm building and it looks ok in both IE and FF.
>> One thing remains though and its driving me nuts. I've got two divs's
>> displayed next too each other to make two cols, the left hand div set at
>> a width of 250px, the right hand div no width set.
>> In FF the right div starts at the edge of the left div and displays
>> correctly, however in IE the right div starts at the edge of the page
>> (although the text in the div starts at the edge of the left div).
>>
>> So If i set margin-left on the maincontent div to 255px in IE it sits
>> where I want, but in FF it sits 255px away from the left div which just
>> looks wrong.
>>
>> The URL is: http://www.paulwatt.info/test/turn/ .
>> and http://www.paulwatt.info/test/turn/css/turnlayout.css
>>

>
> .leftcell{
> margin-top:5px;
> width: 250px;
> position: absolute;
> }
>
> Look into FLOAT, and lose position:absolute


I tried Float but it wasnt working for me, so I had to resort to
position:absolute.



 
Reply With Quote
 
Tony
Guest
Posts: n/a
 
      04-05-2006
Paul Watt wrote:

>>>The URL is: http://www.paulwatt.info/test/turn/ .
>>> and http://www.paulwatt.info/test/turn/css/turnlayout.css
>>>

>>
>>.leftcell{
>> margin-top:5px;
>> width: 250px;
>> position: absolute;
>>}
>>
>>Look into FLOAT, and lose position:absolute

>
>
> I tried Float but it wasnt working for me, so I had to resort to
> position:absolute.


What happened when you used float?
 
Reply With Quote
 
Paul Watt
Guest
Posts: n/a
 
      04-05-2006

"Tony" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Paul Watt wrote:
>
>>>>The URL is: http://www.paulwatt.info/test/turn/ .
>>>> and http://www.paulwatt.info/test/turn/css/turnlayout.css
>>>>
>>>
>>>.leftcell{
>>> margin-top:5px;
>>> width: 250px;
>>> position: absolute;
>>>}
>>>
>>>Look into FLOAT, and lose position:absolute

>>
>>
>> I tried Float but it wasnt working for me, so I had to resort to
>> position:absolute.

>
> What happened when you used float?


I had two cells leftcell and maincontent; I had leftcell (float:left;
width:250px and maincontent(no float,margin-left:255px. IE and FF
couldnt decide where to start counting the 255px from because leftcell was
floated.

Paul


 
Reply With Quote
 
axlq
Guest
Posts: n/a
 
      04-05-2006
In article <(E-Mail Removed)>,
Paul Watt <(E-Mail Removed)> wrote:
>I had two cells leftcell and maincontent; I had leftcell (float:left;
>width:250px and maincontent(no float,margin-left:255px. IE and FF
>couldnt decide where to start counting the 255px from because leftcell was
>floated.


Try and see what happens if you set a margin-left: -1px; in the
left-floated box. It fixes up a similar problem in NS4.

See: http://realworldstyle.com/2col.html

I have found this to be a very useful example for my own page layouts.

-A
 
Reply With Quote
 
Tony
Guest
Posts: n/a
 
      04-05-2006
Paul Watt wrote:
> "Tony" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>>I tried Float but it wasnt working for me, so I had to resort to
>>>position:absolute.

>>
>>What happened when you used float?

>
> I had two cells leftcell and maincontent; I had leftcell (float:left;
> width:250px and maincontent(no float,margin-left:255px. IE and FF
> couldnt decide where to start counting the 255px from because leftcell was
> floated.


What happens if you leave off the margin-left:255px?
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      04-05-2006
To further the education of mankind, "Paul Watt"
<(E-Mail Removed)> declaimed:

> Hi,
> Ok, I've solved most of the layout issues I was having with the
> template I'm building and it looks ok in both IE and FF.
> One thing remains though and its driving me nuts. I've got two divs's
> displayed next too each other to make two cols, the left hand div set
> at a width of 250px, the right hand div no width set.
> In FF the right div starts at the edge of the left div and displays
> correctly, however in IE the right div starts at the edge of the page
> (although the text in the div starts at the edge of the left div).
>
> So If i set margin-left on the maincontent div to 255px in IE it sits
> where I want, but in FF it sits 255px away from the left div which
> just looks wrong.
>
> The URL is: http://www.paulwatt.info/test/turn/ .
> and http://www.paulwatt.info/test/turn/css/turnlayout.css


Try adding left:0; to your .leftcell css. (Untried.)

--
Neredbojias
Infinity can have limits.
 
Reply With Quote
 
Paul Watt
Guest
Posts: n/a
 
      04-05-2006

"Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote in
message news:Xns979C8720F2950httpwwwneredbojiasco@208.49.8 0.251...
> To further the education of mankind, "Paul Watt"
> <(E-Mail Removed)> declaimed:
>
>> Hi,
>> Ok, I've solved most of the layout issues I was having with the
>> template I'm building and it looks ok in both IE and FF.
>> One thing remains though and its driving me nuts. I've got two divs's
>> displayed next too each other to make two cols, the left hand div set
>> at a width of 250px, the right hand div no width set.
>> In FF the right div starts at the edge of the left div and displays
>> correctly, however in IE the right div starts at the edge of the page
>> (although the text in the div starts at the edge of the left div).
>>
>> So If i set margin-left on the maincontent div to 255px in IE it sits
>> where I want, but in FF it sits 255px away from the left div which
>> just looks wrong.
>>
>> The URL is: http://www.paulwatt.info/test/turn/ .
>> and http://www.paulwatt.info/test/turn/css/turnlayout.css

>
> Try adding left:0; to your .leftcell css. (Untried.)
>


All sorted now using a mix of absolute positioning and a IE browser hack!
Thanks any way

Paul.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Re-Re visit, last one I promise Patrick Michael A+ Certification 1 05-01-2005 12:29 AM
Re: Re-Re visit, last one I promise Patrick Michael A+ Certification 0 04-29-2005 08:54 PM
Question re Promise Ultra ATA100 TX2 IDE (PCI) controller card Jimmy Dean Computer Support 2 07-31-2004 12:42 AM
Promise controller needs pressure to work ?? Nottoman Computer Support 5 01-04-2004 11:31 PM
(Raid) Promise MBFastTrack 133 lite Controller (on ASUS P4B266-E R Mobo) IAA Architecten T. Zoetebier Computer Support 1 09-04-2003 01:27 PM



Advertisments