HighDots Forums  

Problem with CSS positionning

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Problem with CSS positionning in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
seajay
 
Posts: n/a

Default Problem with CSS positionning - 07-04-2005 , 11:25 AM






Hello,

I've designed a website with using any tables, everything is postionned
using css, content goes into divs. However I've noticed that the
website
looks different across browsers. I would like to know how to invoid
this
without having to include a CSS for every browser.
Here's a link to the page
http://www.myexersize.com/biography/

I am using absolute positionning. I am thinking of changing that
to relative.
The website displays quite nicely on IE6

Please advise


Reply With Quote
  #2  
Old   
C A Upsdell
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-04-2005 , 12:10 PM






seajay wrote:
Quote:
Hello,

I've designed a website with using any tables, everything is postionned
using css, content goes into divs. However I've noticed that the
website
looks different across browsers. I would like to know how to invoid
this
without having to include a CSS for every browser.
Here's a link to the page
http://www.myexersize.com/biography/

I am using absolute positionning. I am thinking of changing that
to relative.
The website displays quite nicely on IE6

Please advise
Your DOCTYPE is not on line 1. Your page does not validate. Fix your
page before asking for help.


Reply With Quote
  #3  
Old   
Spartanicus
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-04-2005 , 12:49 PM



"seajay" <seajay (AT) teckies (DOT) com> wrote:

Quote:
I've designed a website with using any tables, everything is postionned
using css, content goes into divs.
A common newb mistake.

http://homepage.ntlworld.com/spartanicus/seajay.png

Quote:
I am using absolute positionning. I am thinking of changing that
to relative.
Don't, get rid of all positioning. You've completely misunderstood how
it should be used (if at all).

--
Spartanicus


Reply With Quote
  #4  
Old   
Els
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-04-2005 , 03:21 PM



David Håsäther wrote:

Quote:
C A Upsdell <""cupsdellXXX\"@-@- (AT) XXXupsdell (DOT) com"> wrote:

Your DOCTYPE is not on line 1.

So?
So it might just as well not be there :-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -


Reply With Quote
  #5  
Old   
Big Bill
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-05-2005 , 01:39 AM



On Mon, 04 Jul 2005 19:16:39 GMT, "David Håsäther" <hasather (AT) msn (DOT) com>
wrote:

Quote:
C A Upsdell <""cupsdellXXX\"@-@- (AT) XXXupsdell (DOT) com"> wrote:

Your DOCTYPE is not on line 1.

So?
Probably it should be.

BB
--
www.kruse.co.uk/ seo (AT) kruse (DOT) demon.co.uk
seo that watches the river flow...
--


Reply With Quote
  #6  
Old   
Els
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-05-2005 , 05:15 AM



David Håsäther wrote:

Quote:
Big Bill <kruse (AT) cityscape (DOT) co.uk> wrote:

Your DOCTYPE is not on line 1.

So?

Probably it should be.

There is no such requirement.
It does have to be the first line of code in the document though.
Add anything else before it, and it's the same as not having a doctype
at all.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Genesis - I Can't Dance


Reply With Quote
  #7  
Old   
Els
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-05-2005 , 05:45 AM



David Håsäther wrote:

Quote:
Els <els.aNOSPAM (AT) tiscali (DOT) nl> wrote:

David Håsäther wrote:

Big Bill <kruse (AT) cityscape (DOT) co.uk> wrote:

Your DOCTYPE is not on line 1.

So?

Probably it should be.

There is no such requirement.

It does have to be the first line of code in the document though.
Add anything else before it, and it's the same as not having a
doctype at all.

I don't know where you got that from. Comment declarations, processing
instructions and whitespace can all appear before the doctype
declaration, and so can the XML declaration if you're using XML. This
declaration really needs to be first in the document though.
The fact that some browsers may not be able to sniff the doctype if
certain things appear before it, is not relevant.
Why is that not relevant? I was under the impression that web pages
were to be displayed in browsers, which by the doctype will decide how
to render it.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Elton John - Your Song


Reply With Quote
  #8  
Old   
Els
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-05-2005 , 07:44 AM



David Håsäther wrote:

Quote:
Els <els.aNOSPAM (AT) tiscali (DOT) nl> wrote:

I don't know where you got that from. Comment declarations,
processing instructions and whitespace can all appear before the
doctype declaration, and so can the XML declaration if you're
using XML. This declaration really needs to be first in the
document though. The fact that some browsers may not be able to
sniff the doctype if certain things appear before it, is not
relevant.

Why is that not relevant? I was under the impression that web
pages were to be displayed in browsers, which by the doctype will
decide how to render it.

I was under the impression that this discussion was about a requirement
for the doctype declaration to be on the first line, not some clueless
behavior performed by tag slurpers.
Misunderstanding maybe then.
I read mr. Upsdell's reply as two separate remarks. The page not
validating not being a direct result of the doctype not being on line
1.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Europe - Open Your Heart


Reply With Quote
  #9  
Old   
C A Upsdell
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-05-2005 , 12:28 PM



David Håsäther wrote:

Quote:
I was under the impression that this discussion was about a requirement
for the doctype declaration to be on the first line, not some clueless
behavior performed by tag slurpers.
Depends on what you mean by 'requirement'. The specs allow whitespaces
prior to the DOCTYPE, so the specs do not _require_ that the DOCTYPE be
on line 1. However, we all know that real-world user agents violate the
specs in unpleasant ways, and we have a _requirement_ to build sites for
real-world user agents (i.e. clueless tag slurpers), so we have to take
into account their idiosyncracies.

Having said that, I must confess that I do not remember which user
agents violate this particular aspect of the specs: sometime in my past
I ran across at least one browser that did have such a problem, so I
made it a rule always to put the DOCTYPE on line 1; however, it is
_possible_ that this problem is not extant in today's real-world
browsers. Nonetheless, I felt it prudent to suggest that the OP move
the DOCTYPE to line 1, and also make the page valid, in order to
eliminate the possibility that either the position of the DOCTYPE or the
non-validity of the page was causing the problem for which the OP was
seeking help.


Reply With Quote
  #10  
Old   
Steve Pugh
 
Posts: n/a

Default Re: Problem with CSS positionning - 07-05-2005 , 02:35 PM



C A Upsdell <""cupsdellXXX\"@-@- (AT) XXXupsdell (DOT) com"> wrote:

Quote:
David Håsäther wrote:

I was under the impression that this discussion was about a requirement
for the doctype declaration to be on the first line, not some clueless
behavior performed by tag slurpers.

Depends on what you mean by 'requirement'. The specs allow whitespaces
prior to the DOCTYPE, so the specs do not _require_ that the DOCTYPE be
on line 1. However, we all know that real-world user agents violate the
specs in unpleasant ways, and we have a _requirement_ to build sites for
real-world user agents (i.e. clueless tag slurpers), so we have to take
into account their idiosyncracies.

Having said that, I must confess that I do not remember which user
agents violate this particular aspect of the specs: sometime in my past
I ran across at least one browser that did have such a problem, so I
made it a rule always to put the DOCTYPE on line 1; however, it is
_possible_ that this problem is not extant in today's real-world
browsers. Nonetheless, I felt it prudent to suggest that the OP move
the DOCTYPE to line 1, and also make the page valid, in order to
eliminate the possibility that either the position of the DOCTYPE or the
non-validity of the page was causing the problem for which the OP was
seeking help.
IE switches to quirks mode if there's any non-white space content
before the doctype, regardless of whether the doctype would normally
trigger quirks or standards. Most often observed with XML
declarations.

However, IE ignores white space before the doctype so this page shoudl
be treated the same as any other.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.