Jump to content
PlanetAlexander

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

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

Share this post


Link to post
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.

Share this post


Link to post
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).

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Make a copy of your page and then strip it down to the minimum that still displays the problem. Then show us that code.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...