Vic Main

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromVic Main
ToMe
SubjectThanks for the fixedPosition.html page
Date20 January 2010 08:18
Hi:

Just wanted to thank you for the
http://www.howtocreate.co.uk/fixedPosition.html page. I hadn't realized the
problem, I had just re-written my pages for fixed ad hadn't checked with
I.E.

I have one question though, just curiosity. What is the reason behind the
div in front of the # for in these line below??
div > div#fixme { position: fixed; }
div > div#fixmetoo { position: fixed; }

Thanks again

Vic Main
FromMe
ToVic Main
SubjectRe: Thanks for the fixedPosition.html page
Date20 January 2010 16:25
Vic,

> What is the reason behind the div in front of the # for in these line below??
> div > div#fixme { position: fixed; }

Specifically, it is the > selector that is important, since it means the CSS
rule will only be applied in browsers that support it. That means that it
does not apply in IE 6, for example.

The > selector needs something before it, such as an element name, .class or
* wildcard. You can use whichever works for you, as long as the rule uses
something that ensures it will not match in IE 6, but will match in IE 7 and
better browsers.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromVic Main
ToMe
SubjectRe: Thanks for the fixedPosition.html page
Date20 January 2010 19:07
Tarquin...

Yes I Did Get Your Script To Work, This Is The Script Right Out Of The
Source Code Of Your Fixedposition.Html Page. You Are Using "Div" As The
Parent There, And I Had A Struggle Making "Body" As The Parent Until I
Realized I Had An Unclosed <Font> Tag. I Closed That And Everything Worked
Fine.

While I Was Trying To Get The Body As Parent, I Removed The Div From
"Div#Fixme" And It Still Worked, So That's Why My Question About The It..

[Ed. Seems I missed this question. Oops. See CSS tutorial.]

I'm Using I.E.6, Netscape, And Firefox. I Tried I.E.7, And It Just Kept
Crashing, So I Just Removed It.

Again, Thanks For Your Site, It Was A Big Help In Making My Pages Work Like
I Wanted.

Vic
FromVic Main
ToMe
SubjectRe: Thanks for the fixedPosition.html page
Date21 January 2010 22:56
Hi Again:

I thought you might want to know that you've spelled remains "reamins" on 
http://www.howtocreate.co.uk/tutorials/design/visual in the top paragraph on
that page.

As an aside, I thank you for expressing my views on a lot of poor sites. It
drives me nuts when sites are geared for only one size of window, or are
left aligned and not taking advantage and adjusting for the viewers browser
window.

Vic Main
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.