Fixed Positioning!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mr Prister
    New Member
    • Nov 2008
    • 12

    Fixed Positioning!

    I've tried to create a sidebar that uses the fixed positioning property. However after looking through various tutorials and how to's of the web I can't find a bugger wrong with my code.

    This is good i hear you say.... well no its not. The problem is that the frigging sidebar isn't fixed!

    You maybe able to tell but this is pissing me off to say the least. So i'm praying that someone with much superior CSS knowledge then I can solve the problem.

    Code:
    <html>
    
    
    
    <head>
    
    <style type="text/css">
    *** i did have .sidebar here with the css code i've currently got in the style but it didn't affect it at all....!***
    </style>
    
    </head>
    
    <body style = "background: black url(HeaderBG.png) repeat-x top left">
    
    <div class = "Sidebar" style = "position: fixed; top: 10%; left: 2%; border-color: white;">
    <table width = "150" height = "500" border = "1">
    	<tr>
    		<td>
    			Some Text
    		</td>
    	</tr>
    	<tr>
    		<td>
    			Some Text
    		</td>
    	</tr>
    </table>
    </div>
    
    </body>
    
    </html>
    I've included the header graphic for use if you want to test it out.

    (( Please note that im using IE.7 to test this so as far as i'm aware the position: fixed; property should work no problem. ))

    Please help someone !?!?
    Attached Files
  • Mr Prister
    New Member
    • Nov 2008
    • 12

    #2
    By the way before anybody says.... i've already added a load of content to make the page longer. So the problem isn't that "i can't see that the sidebar is working because the page isn't long enough." If that makes sense?

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      which browser are you using? (IE doesn't know position: fixed)

      Comment

      • Mr Prister
        New Member
        • Nov 2008
        • 12

        #4
        Originally posted by Dormilich
        which browser are you using? (IE doesn't know position: fixed)
        IE 7.... as far as i was aware IE 7 supported position: fixed;

        "Note that IE 7 from beta 2 upwards does support position: fixed; "

        And i can happly view other people's fixed positioned divs....

        I'm confused =[

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          Where are you adding the text? If you create a <p> and fill the screen with text, it works fine in FF. Not on Windows right now so can't check IE.

          Comment

          • hsriat
            Recognized Expert Top Contributor
            • Jan 2008
            • 1653

            #6
            IE considers it to be position:fixed only if accomplished with an XHTML strict doctype.

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              Originally posted by hsriat
              IE considers it to be position:fixed only if accomplished with an XHTML strict doctype.
              which is kind of paradox since IE doesn't handle XHTML natively.......

              Comment

              • David Laakso
                Recognized Expert Contributor
                • Aug 2008
                • 397

                #8
                Please see Tarquin for one opinion regarding browser support for, and the implementation of position:fixed;

                Comment

                • drhowarddrfine
                  Recognized Expert Expert
                  • Sep 2006
                  • 7434

                  #9
                  No, it does not need to be XHTML Strict but HTML Strict will do just as well.

                  Comment

                  • hsriat
                    Recognized Expert Top Contributor
                    • Jan 2008
                    • 1653

                    #10
                    OK.... "strict dtd" was my main point. :)

                    Comment

                    Working...