• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't get CSS Positioning right

 
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I can't seem to get CSS positioning worked out. Following is an html example of what I'm trying to do. All the divs except for #insideTop are shown more or less like I want, but #insideTop's "left" and "right" properties with both relative and absolute positioning are being ignored by both IE6 and Firefox. Could someone let me know what I am doing wrong?



Thank you in advance,
Yuriy
[ April 07, 2005: Message edited by: Yuriy Zilbergleyt ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a very very very quick glance. You need a doctype...make IE behave correctly.

Eric
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the advice!

Just tried the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Seemed like the shapes of the div slightly changed in IE, probably the padding and stuff like that, but the main problem remains.

Thank you,
Yuriy
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
another thing looking at it, you have a : instead of a ; in the insideTop
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also when you move stuff realtivly the holder does not change its height to fit it.....aka, you are going to get over hang....
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I realized that after looking at the borders. That's not really a big deal right now since bottomDiv isn't offset that much and insideTop will have a smaller width (I just didn't set it yet.) I'm just trying to figure out how to get insideTop positioned correctly within topDiv.

Thank you,
Yuriy
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oops, putting the semicolon after "absolute" fixed the problem! Weird though since my actual page that this is based on didn't have the typo, and the problem is there. I'll have to take a closer look at the differences...

Thank you,
Yuriy
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a basic framework what you are working on...



To keep the formatting, quote this and then do a find/replace on the escaped tags. Makes it easier. This code is the basic frameowrk of my web page that I am working on, someday I might finsih it..

Eric
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not quite what I need at the moment, but I'll use it for pages that fit. Thanks!
Oh and I worked out what was wrong with my page - a different typo.... Maybe I should use one of those CSS validators...

-Yuriy
 
reply
    Bookmark Topic Watch Topic
  • New Topic