Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS layout problem - I'm stumped!

Reply
Thread Tools

CSS layout problem - I'm stumped!

 
 
Si
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
 
 
 
Si
Guest
Posts: n/a
 
      01-25-2005
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


 
Reply With Quote
 
 
 
 
Richard
Guest
Posts: n/a
 
      01-25-2005
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.





 
Reply With Quote
 
Hywel Jenkins
Guest
Posts: n/a
 
      01-25-2005
In article <(E-Mail Removed)>, 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.
 
Reply With Quote
 
Henry
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
n|ck
Guest
Posts: n/a
 
      01-27-2005
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.
 
Reply With Quote
 
Si
Guest
Posts: n/a
 
      01-27-2005
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
 
Reply With Quote
 
n|ck
Guest
Posts: n/a
 
      01-27-2005
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?
 
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
CSS: a simple layout won't work in CSS liketofindoutwhy@gmail.com HTML 29 03-21-2008 03:46 PM
Css-Layout vs Table-Layout Habib HTML 15 06-20-2006 05:11 AM
Choosing Layout: Css-Layout or Table-Layout hpourfard@gmail.com ASP .Net 1 06-19-2006 10:06 AM
Table-based layout to CSS layout Guybrush Threepwood HTML 20 06-11-2006 11:12 AM
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM



Advertisments