Jump to content

CSS: position: fixed; Still Not Working + Div not moving


PlanetAlexander

Recommended Posts

I know there are a lot of topics out there about the CSS position: fixed not working, but those solutions do not work for me. Here is the CSS code:

#slideshow{	height: 200px;	width: 1308px;	background-color: #dbdbdb;	top: 800px;	left: -100px;	border-style: solid;	border-color: #b0adb0;	border-width: 03px;	position: fixed;	}

In the screenshot (slideshowDIVhidden), the div is supposed to show up between the very top box and the two bottom boxes, while still being still relative to the viewport. When it is hidden, this is because the position: fixed; code is on. The slideshowDIVshown is what it is meant to look like (doesn't use position: fixed;) but is not relative to the viewport, and for some reason, I cannot move it. The slideshow DIV is not a "child" DIV.

Any ideas how to fix the position: fixed, and why the div won't move?

post-190685-0-26004500-1444857559_thumb.png

post-190685-0-86869500-1444857560_thumb.png

Link to comment
Share on other sites

Well it is nice that you posted some code; there is no way of knowing what that code should do without context. We need to see the whole thing. Your question is like showing someone a brick and asking them if the building it will go ito is a good design.

 

Post a link to the page or complete because everything in a webpage ties together.

Link to comment
Share on other sites

Do you need to position one element on top of another element?

Eventually, I will be using the z-index to put the slideshow div at the back. I had used this before on the same div, but I am not using it untill I can get the position: fixed working (Unless I need to use the z-index to get it to work).

Link to comment
Share on other sites

Looking at images, doesn't the top: property value look extremely proportionately high? Considering possible height of browser menu, title bar, tabs etc, with this top value it would place it beyond the bottom edge of browser window viewport out of view anyway.

Link to comment
Share on other sites

Looking at images, doesn't the top: property value look extremely proportionately high? Considering possible height of browser menu, title bar, tabs etc, with this top value it would place it beyond the bottom edge of browser window viewport out of view anyway.

I know what your saying, I had it like that to try and position it in that location - it worked, untill the weird thing happened when the div won't move. It's been a while since I have used HTML and CSS, so not all properties are fresh in my mind. Thank you to everyone who has helped so far.

Link to comment
Share on other sites

AS mentioned, short bit of css coding and not so pretty images does nothing to help us determine the problem, we need ALL relevant html and css styling code, or boring guessing game is going to happen, which will conclude in peeps thinking if OP can't be bothered to supply relevant info, i'm off!

 

Edit: what does 'Div not moving' actually mean? fixed div? once you set its top: left etc properties it won't move, ITS FIXED.

 

Hidden? how are you hiding? display: none; removes it completely and it occupies no space, invisibility: hides the element, but it still occupies space.

Edited by dsonesuk
Link to comment
Share on other sites

more than 20 hours have been wasted with guessing games because you ignore the request for a link or full code. I see no point in continuing follow the game of "guess what the code looks like", but as long as the OP gets pointless guessing there is no need to do thing right.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...