Questions tagged [fixed]

Please don't use; the more specific [css-position] or [fixed-point] tags are preferred.

(review to be retagged or , remove otherwise)


1909 questions
18
votes
2 answers

position:fixed in reveal.js

I am trying to make a header for my reveal.js presentation that sticks to the top of the screen. The content in the header is dynamic on a per-slide basis, so I have to place the markup within the section tag. Apparently position:fixed does not…
zkwsk
  • 1,960
  • 4
  • 26
  • 34
17
votes
2 answers

What is the overhead of the C# 'fixed' statement on a managed unsafe struct containing fixed arrays?

I've been trying to determine what the true cost of using the fixed statement within C# for managed unsafe structs that contain fixed arrays. Please note I am not referring to unmanaged structs. Specifically, is there a reason to avoid the pattern…
Eric Cosky
  • 554
  • 3
  • 11
16
votes
4 answers

Get the position of a fixed div with jquery

I have a div with position "fixed" and I want to get the value of its position relative to the whole document while the user scrolls down the page. So, lets say I place the div on (x=0,y=0) and then the user scrolls down a bit and now, relative to…
m4rk
  • 175
  • 1
  • 1
  • 6
16
votes
2 answers

Fixing position relative to parent div

Is it possible to fix an element's position relative to the parent div, not the browser window? Say I have:
Windbrand
  • 555
  • 4
  • 13
  • 21
16
votes
9 answers

how do I keep a nav bar at the top of the page?

I'm trying to make my nav bar stay at the top of the page like on forbes.com I know I could do nav { position: fixed; top: 0; } but the nav bar isn't at the top of the page, it comes after the logo... When you scroll down however, I want the…
Adam Scot
  • 1,371
  • 4
  • 21
  • 41
15
votes
6 answers

Positioning scrollable content under fixed flexbox navigation menu

I have the following snippet (need to view in full screen mode), that I'm trying to place the
element directly under the
element. I have the
in a fixed position because I want it to stay at the top of the screen as the user…
Austin
  • 1,619
  • 7
  • 25
  • 51
14
votes
5 answers

Java fixed memory map

Is there a simple, efficient Map implementation that allows a limit on the memory to be used by the map. My use case is that I want to allocate dynamically most of the memory available at the time of its creation but I don't want OutOFMemoryError at…
juber
  • 141
  • 1
  • 5
12
votes
1 answer

Advanced jQuery "Sticky Bottom" and also Scrolling Sidebar Issue

Having searched everywhere for a solution to this problem, and attempting to use a few plugins like jQuery Way-points, to no degree of success, I hope that someone here will be able to offer a solution to this. As it is a bit complex to explain…
Steve Adams
  • 264
  • 1
  • 11
12
votes
2 answers

Best Practice for Fixed Size String Class

I would like to have a fixed size string class. Ideally, the interface would match the one of std::string with the one difference that the new class never allocates new memory. It is supposed to be a handy class for application cases where…
ruhig brauner
  • 943
  • 1
  • 13
  • 35
12
votes
4 answers

Simulate position:fixed in jQuery

I have a header that is larger than the width of the page so that I can't use position:fixed to set him on top of the page, because I absolutely need to be able to scroll horizontally. I don't think there is a CSS solution for this. I made a sample…
Michael Lumbroso
  • 4,931
  • 5
  • 27
  • 34
12
votes
1 answer

C# compare 3 byte field

EDIT The cmp instructions that are not used are to cause a NullPointerException. What are these strange cmp [ecx], ecx instructions doing in my C# code? ORIGINAL POST (even more edits below) I'm trying to understand the way the JIT compiles code. In…
johnnycrash
  • 5,184
  • 5
  • 34
  • 58
11
votes
1 answer

JQuery Mobile scrollable list inside position:fixed element? (Sencha Touch behavior)

A typical use case would be a page with two columns: The standard behavior in JQuery Mobile is the content scrolls together with page. Is it possible to build an app with JQM using a different paradigm - a fixed viewport with scrollable content?
Vitaly
  • 4,358
  • 7
  • 47
  • 59
11
votes
8 answers

HTML / CSS : Fixed Margin & Fluid Width

How should I make this with CSS: I would like to have 2 divs or more and their width should be in percent, but the margin between the divs should be fixed, in this example 30px The problem for me is the margin between the two divs because I can put…
Adam Halasz
  • 57,421
  • 66
  • 149
  • 213
11
votes
2 answers

How to control the anchor landing position

We currently have the problem, that links in the form www.example.com/#section don't jump to the right location, because we have a fixed navigation at the top which covers up the first part of the website.
Some content…
Simon Ferndriger
  • 4,455
  • 6
  • 28
  • 53
10
votes
3 answers

jQuery Select Elements with a certain CSS

I'm trying to add a bit of jQuery code to all elements that have position:fixed set on them. Is this sort of thing possible? It would be very helpful if there is, so I don't have to go through all my code and an extra class to the objects that are…
Brian Leishman
  • 8,155
  • 11
  • 57
  • 93