CSS layout problem - I'm stumped!

Discussion in 'HTML' started by Si, Jan 25, 2005.

  1. Si

    Si Guest

    Hi all.

    I have a really weird problem that I just cannot fix. I probably cannot
    see the wood for the trees ;-)

    I have checked the site in Mozilla/Firefox, Opera but not Netscape ( NS
    has decided not to load on my system for some reason) and all is fine.

    The site is one that I am building for my step daughter and I'm starting
    to look like an incompetant coder whilst I am trying to fix this :-(

    The address is

    http://www.natashajacobs.com

    I hesitate to say I have a table version I knocked up in seconds here
    http://www.natashajacobs.com/defaultVer2.asp
    to show how it should look and I'm resisting her pressures to 'just use
    that one then'

    A quick look at the site in IE and my problem is very obvious! I hate IE
    sometimes! Unless it is my dodgy coding at fault, in which case I
    apologise in advance.

    Hope someone can help.

    Cheers
    Si
     
    Si, Jan 25, 2005
    #1
    1. Advertising

  2. Si

    Si Guest

    Si wrote:
    > Hi all.
    >
    > I have a really weird problem that I just cannot fix. I probably cannot
    > see the wood for the trees ;-)


    I've found it!

    I hadn't validated my style sheet, and low and behold, there was a
    sneeky " left over from when I took the style out of the html for
    placement in the stylesheet.

    W3C helps again!

    Si
     
    Si, Jan 25, 2005
    #2
    1. Advertising

  3. Si

    Richard Guest

    On Tue, 25 Jan 2005 19:14:09 GMT Si wrote:

    > Si wrote:
    >> Hi all.


    >> I have a really weird problem that I just cannot fix. I probably
    >> cannot
    >> see the wood for the trees ;-)


    > I've found it!


    > I hadn't validated my style sheet, and low and behold, there was a
    > sneeky " left over from when I took the style out of the html for
    > placement in the stylesheet.


    > W3C helps again!


    > Si


    Yep. That's how I found the flaw in the menu I'm using.
    When I rewrote it, I validated each change just to be sure.
     
    Richard, Jan 25, 2005
    #3
  4. In article <>, Anonymous@127.001 says...
    > On Tue, 25 Jan 2005 19:14:09 GMT Si wrote:
    >
    > > Si wrote:
    > >> Hi all.

    >
    > >> I have a really weird problem that I just cannot fix. I probably
    > >> cannot
    > >> see the wood for the trees ;-)

    >
    > > I've found it!

    >
    > > I hadn't validated my style sheet, and low and behold, there was a
    > > sneeky " left over from when I took the style out of the html for
    > > placement in the stylesheet.

    >
    > > W3C helps again!

    >
    > > Si

    >
    > Yep. That's how I found the flaw in the menu I'm using.
    > When I rewrote it, I validated each change just to be sure.


    ROTFLMAO!

    --
    Hywel http://kibo.org.uk/
    I do not eat quiche.
     
    Hywel Jenkins, Jan 25, 2005
    #4
  5. Si

    Henry Guest

    Si wrote:



    > I hesitate to say I have a table version I knocked up in seconds here
    > http://www.natashajacobs.com/defaultVer2.asp
    > to show how it should look and I'm resisting her pressures to 'just use
    > that one then'




    Evidently the best, simplest and sure way to do it.

    ;)


    Simple question.

    What's wrong with table version?

    The same size, loads the same.

    :-O
     
    Henry, Jan 25, 2005
    #5
  6. Si

    n|ck Guest

    Si wrote:
    > http://www.natashajacobs.com


    Glad you were able to get it working! Can I suggest a slight change in your
    code? It might prevent headaches later.

    Instead of:

    <style type="text/css" media="screen">
    @import "/gallery.css";
    </style>

    <style type="text/css" media="print">
    @import "/print.css";
    </style>

    Try using this:

    <link rel="stylesheet" href="/print.css" media="print">
    <style type="text/css" media="screen">
    @import url("/gallery.css");
    </style>

    This will do two things:

    a)
    Prevent your "flash of unstyled content" problem you're having

    b)
    Your gallery.css file will be hidden from older browsers like Netscape 4.x
    (because of the @import url("") statement) but your print stylesheet probably
    does not need hiding from these older browsers and so it's safe keep it visible
    for all browsers.

    You don't have to take this information on board. If I'm wrong on any of this, I
    hope people will correct me but these are the principles I've been working with
    since I moved to CSS.

    HTH,

    Nick.
     
    n|ck, Jan 27, 2005
    #6
  7. Si

    Si Guest

    n|ck wrote:
    > Glad you were able to get it working! Can I suggest a slight change in
    > your code? It might prevent headaches later.


    Always open to suggestions

    > Instead of:
    >
    > <style type="text/css" media="screen">
    > @import "/gallery.css";
    > </style>
    >
    > <style type="text/css" media="print">
    > @import "/print.css";
    > </style>
    >
    > Try using this:
    >
    > <link rel="stylesheet" href="/print.css" media="print">
    > <style type="text/css" media="screen">
    > @import url("/gallery.css");
    > </style>
    >
    > This will do two things:
    >
    > a)
    > Prevent your "flash of unstyled content" problem you're having


    I hadn't noticed this effect in any of my tests, I have made the change
    suggested above, all seems the same.

    > b)
    > Your gallery.css file will be hidden from older browsers like Netscape
    > 4.x (because of the @import url("") statement) but your print stylesheet
    > probably does not need hiding from these older browsers and so it's safe
    > keep it visible for all browsers.


    I see your point, I've updated the styles, infact, initially, they where
    both of the link rel type, it was then that sometimes I noticed FF would
    load the page with no style and I had to reload to bring the style sheet
    in, this may be a bug in my FF possibly.

    > You don't have to take this information on board. If I'm wrong on any of
    > this, I hope people will correct me but these are the principles I've
    > been working with since I moved to CSS.


    Many thanks

    Si
     
    Si, Jan 27, 2005
    #7
  8. Si

    n|ck Guest

    Si wrote:
    > I hadn't noticed this effect in any of my tests, I have made the change
    > suggested above, all seems the same.


    ah okay, I noticed the flash of unstyled content the first time I loaded the
    page but I'm not sure if it was IE or Firefox... I think the bug only occurs in IE?
     
    n|ck, Jan 27, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    734
    clintonG
    Dec 24, 2004
  2. Guybrush Threepwood

    Table-based layout to CSS layout

    Guybrush Threepwood, Jun 6, 2006, in forum: HTML
    Replies:
    20
    Views:
    1,014
  3. Replies:
    1
    Views:
    585
    John Timney \(MVP\)
    Jun 19, 2006
  4. Habib

    Css-Layout vs Table-Layout

    Habib, Jun 19, 2006, in forum: HTML
    Replies:
    15
    Views:
    1,018
    Wÿrm
    Jun 20, 2006
  5. Replies:
    29
    Views:
    883
    Ben C
    Mar 21, 2008
Loading...

Share This Page