Most voted "positioning" questions
Tag referring to questions that involve positioning elements within a context (positioning a button on a page, position of an information in a matrix, etc)
Learn more…79 questions
Sort by count of
-
49
votes2
answers40509
viewsWhen to use Absolute or relative position in CSS?
I know an element inside with position absolute does not respect the boundaries of the parent div and that relative respects, and theoretically positions itself in relation to itself. My doubts are…
-
20
votes4
answers552
viewsHow to distribute words in a fixed size area?
I have a list of words and I need to distribute them in an area of fixed dimensions so that it looks like they were randomly arranged in that space. However, I need to make sure that the words do…
-
7
votes1
answer867
viewsElement moves out of place in "out-zoom"
On this website, the menu is a ul inline, is inside the div with indefinite dark-colored width. In ul placed margin-left to align with the blocks below... It turns out that at another resolution or…
-
6
votes1
answer1330
viewsScroll DIV content without leaving the DIV
Hello, I have a problem, I would like my DIV of the right corner to follow the content of the left until the content of the left is finished, only if I put position Fixed in the DIV of the right it…
-
6
votes1
answer285
viewsGet mouse position in percentage by clicking on image
I have an image on the screen and I need to click on the image and know the position where I clicked on the X and Y of the image. For example, I clicked on the center of the image, then the X would…
-
5
votes1
answer1368
viewsWhen to use vertical-align?
I am aware that in certain cases it is advisable to use this property instead of text-align , margin or position. But I don’t know why or how vertical-align. Besides, how do you use this property?…
-
5
votes5
answers511
viewsProblem with footer on mobile sites
I recently came across a problem in a footer of a project of mine. The footer in the case should be at the bottom of the page (bottom: 0;), So far so good, it’s normal. The problem is that when I…
-
3
votes1
answer1604
viewsHow to do "position: Fixed;" on top of everything?
I need to put a fixed div at the top of the screen (until then, just use the position: fixed), but not superimposed by other Ivs and images. It has to be on top of everything. "Organizing":…
-
3
votes1
answer1205
viewsHow to leave a fixed div accompanying the scroll?
I’m using AngularJs and Angular Material and I need to make a div stay fixed but I have no idea how to do, my structure is as follows: <div class="page"> <md-toolbar layout="row">…
-
2
votes2
answers22863
viewsDiv’s with input and label on the same line
My situation: I have a form in which the fields are arranged vertically, and with the label aligned to the right and left, as shown in the image below: I wish to leave at least 2 fields per line for…
-
2
votes1
answer405
viewsBox in the middle of the page according to the resolution
I’m trying to position a box in the middle of the screen and regardless of the resolution the text inside it does not leave the box... Well, I can do two things: position it in the middle, but when…
-
2
votes2
answers2403
viewsPosition a section of the layout below a FIXED header
-> I have a layout whose header is fixed at the top. -> Only that the Section just below is below it and does not follow the same flow(normal) In this case what is the best way to make the…
-
2
votes1
answer391
viewsProblem with include.php positioning
I’m having a problem with the positioning of the footer I made with include.php. I created a file include.php, for now the only thing that has in it is a box where the footer will be, because I’m…
-
2
votes1
answer468
viewsHow to position a Span tag on the page?
I’m studying ASP.NET MVC 5 and I’m trying to create a page where, in the upper left corner, I would have a "Menu" button, I was able to create the button and action, but I’m having trouble locating…
-
2
votes3
answers1704
viewsOutline image with CSS text
I am developing a website but without using any framework to this end;I would like to point out that I have only started in the studies of front, and that CSS is totally new to me. I’m trying to fix…
-
2
votes4
answers1260
viewsFooter always at the bottom of the page
I want to know how to leave the footer always at the bottom of the screen, even on small screens. I’m wearing a bootstrap. This way: I want to leave the footer always at the end of the page…
-
2
votes1
answer514
viewsFixed menu in Parallax
Guys, I’ve done everything but I can’t put a fixed menu in this code (made by tekzzoom), when inserting an item the background overwrites it, and the item does not remain fixed on the screen. Can…
-
2
votes1
answer849
viewsDiv on top of image
I’m trying to put a div on top of the image, this div will be a white container with a certain height and width, inside that container, will contain a title and a paragraph. Below I leave you the…
-
2
votes2
answers56
viewsMake a DIV element stand as a footer
This is an example of what I’m trying to adjust: * { margin: 0; padding: 0; } html,body { height: 100%; } #topo { background: limegreen; position: static; left: 60px; top: 35px; width: 100%;…
-
2
votes1
answer814
viewsContent overwrites fixed menu when scrolling page
I’ve tried to put z-index: 2 in the <header></header>, but it didn’t work @charset "UTF-8"; body { display: flex; min-height: 100vh; width: 100%; margin: 0; padding: 0; align-items:…
-
2
votes1
answer36
viewsI can only change the "bottom" position with "px" and not "%"
I am trying to change the relative’s vertical position ". switch", but I can only do it with px and not with %. How can I solve this? HTML <label class="switch"> <input type="checkbox">…
-
1
votes1
answer197
viewsHow to make the movement of a paragraph not influence other elements
Every time I div her. content moves, the text adjusts itself to its size, but, makes the image/div inside also move, I want to keep the image fixed in the div without being influenced by the other…
-
1
votes3
answers660
viewsPosition of a text relative to the top line
I would like to know how to line up a text vertically, compared to a word/letter of the previous line? When I use only the space bar I can’t get the result. Would have some code for it? For example,…
-
1
votes1
answer417
viewsHow to dynamically position a div with content within a dynamically created div?
On my website, I create a div dynamically, after the second paragraph (forum). I’d like to position a banner already loaded inside that div. tried several ways, to give a apendchild, but it won’t.…
-
1
votes1
answer685
viewsInline-block element drops when filled
I have 3 elements inline-block. Are 3 squares aligned, summarizing. So when I put one div "daughter" in one of them, he falls and the other empties stay in position. It happens the same with all.…
-
1
votes2
answers5882
viewsHow can I place one element on the other side?
I want to put the atendenteBalaoProdutoValor on the side of atendenteBalaoProdutoNome and atendenteBalaoProduto2 below the atendenteBalaoProdutoNome. For that, I tried this: attendant.xml <?xml…
-
1
votes0
answers243
viewsHTML table with Fixed top columns
I’m trying to create a table that by scrolling down the page, the column row is fixed at the top. So far so good, in jQuery I set in the scroll event that when the columns were below offset, it…
-
1
votes2
answers1596
viewsGet cursor position with jquery
Is there any way to get the cursor position relative to the screen when I’m typing in a textarea? Ex: I type some character, call a jquery keyup function and take the position where the cursor is…
-
1
votes2
answers6376
viewsCenter a div with text and position Absolute in the center of div pai
People is the following I have a father div and another div with a text in position Absolute... this text is aligned to the top and left of the father div and I need to align to the center... things…
-
1
votes0
answers73
viewsPosition "Fixed" moves when scrolling down the page on mobile
Create a div with position:fixed;top:0. In the computer is normal, and does not move independently if I go down or raise the screen, but in the cell phone when I go down the screen it comes out, but…
-
1
votes2
answers327
viewsFixed first row table using Material Design Lite
Hello I am using Material Design Lite, I need to leave fixed the first row of the table and scroll the rest of the content. <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">…
-
1
votes2
answers468
viewsHTML/CSS Element out of place
I don’t know where I’m going wrong, but my footer is in the middle of the page. It’s my future portfolio, so it’s not all going to be final. Other suggestions are welcome. *{ margin: 0; padding: 0;…
-
1
votes1
answer351
viewsJquery Form Validation Position of the error div in select fields
To change the position of the error text in fields Select2. is appearing above the field, I want it to appear below! Any hint? <!-- /field --> <div class="col-md-3"> <div…
-
1
votes2
answers623
viewsHow to use css to overwrite half of another DIV that is overflow without using position: Fixed?
I would like to know how to use CSS to put a DIV without position:fixed about the half of another that this with overflow. I’d like it to stay that way: The sample code I’m using is: .div1 { width:…
-
1
votes0
answers39
viewssetx and setY do not work in the pane (Javafx)
I’m having a problem setting the x and y position of an Imageview in a Javafx Pane. It is a loop code and, the first time the method is called, it arrow the img object at the specific coordinates…
-
1
votes1
answer27
viewsSection on top of another section
Section contacts above the text of section about us... Why? I have tried everything, margins, paddings, I cannot use z-index because sections cannot have relative or Absolute position... HTML: /*…
-
1
votes1
answer340
viewsHow to detect if an element is under another element? (HTML, via javascript)
I would like to know how to detect, in a simple way and return the information I need, if one element is under the other. I’ve tried for the offset, but it was very difficult and did not result in…
-
1
votes1
answer31
viewsButton placement to screen resize
I have a slide where the button should always be positioned according to a given image. When resizing the screen the position of the image is changed causing the button to be misaligned and it is…
-
0
votes2
answers199
viewsHow do I position two Ivs relative to a third (Fixed)?
I want two Ivs below a third that has position: fixed, the problem is that these Divs are behind the third, I’ve tried to change the position of the two Divs to relative, Absolute and Static, but it…
-
0
votes1
answer1035
viewsWhen to use PX or % in positions?
On internal layout elements, to position in margin or coordinate, when to use PX and %?
-
0
votes1
answer51
viewsParallax and Pin Elements
I am looking for solution to realize a Parallax effect and fix some elements as I step by screen sessions. The idea of this is to gather the parts of a shoe and assemble it as the scroll rolls. Does…
-
0
votes3
answers121
viewsHelp with CSS - Position Right and Left
I’m trying to create a menu similar to the one I saw on a website. I managed to do everything right, I just can’t let it occupy the entire menu bar. Print1 : http://prntscr.com/bmbbp4 Print2 :…
-
0
votes1
answer61
viewsQml item in fixed position
Mobile devices move the elements up when the keyboard is called, but there are elements that stay in the same position when the device keyboard is called as in the images below. How can I keep a Qml…
-
0
votes1
answer124
viewsDropdown menu changing footer positioning
When opening the list of options, the footer is affected and has its position changed. Code on the fiddle…
-
0
votes2
answers4389
viewsForce a DIV element into the bottom
Good morning, everyone. I need to align elements at the bottom of a mother div. This is a chat screen that messages are displayed whenever there are new ones at the bottom of the window. However, I…
-
0
votes1
answer39
viewsObjects change position when switching from browser
Can anyone tell me why when switching from browser, from Chrome to Firefox, the relative positions I gave in CSS change? Normally I use Chrome, but I tried it on Firefox and all the objects I gave…
-
0
votes1
answer49
viewsFixed menu hides even with z-index
I have the following code: <html lang="pt-br"> <head> <meta charset=utf-8/> <title> Inicio </title> <style type="text/css"> *{ font-size:18px; vertical-align:…
-
0
votes0
answers40
viewsCSS POSITION:RELATIVE - Why not just use Absolute?
If a position:Absolute can be positioned anywhere on the page (including background) and adjusted with Z-index, why is it necessary to use position:relative? Why not just use Position:Absolute?…
-
0
votes1
answer215
viewsSizes of Divs ( Width and Height ) with Relative and/or Absolute positions
I’m having trouble positioning items (div's), in the case, I need the first div, occupy all the height and width of the screen, already the others, occupy only the padding which they receive and the…
-
0
votes1
answer24
viewsMake several div’s Fixed
How to make so that when a div disappears all "stay in the place" in which they are. I leave below an example to be more enlightening. $(document).ready(function(){ $("button").click(function(){…