Last post Nov 15, 2020 11:30 PM by PaulTheSmith
Nov 14, 2020 11:16 PM|johnboyman12|LINK
Hello. I am trying to position a div within a table column. the following code is where the issue is located;
<tr style="width:100%;" class="gradientcontainer">
<div id="downpointer5" style="position:relative; display: block; left:150px; top: 0px; width: 50px; height: 50px; background-image: url(../Content/Images/downpointer.png);" onclick="expandgradientcontainer(5)">
Right here in the code <div id="downpointer5" style="position:relative; display: block; left:150px;
If i set the left to a percentage like 90% instead of left:150px; it doesn't work. My code has to work this way but for some reason it just wont accept a percentage or Calc(100%- 20px) just only pixels. This behaviour is wierd. I cannot use relative or absolute
for they wont work at all for this code so i use position:relative; display:block;
Does anyone know another way i can do this or why it may not be working? thanks alot
Nov 15, 2020 10:17 PM|PaulTheSmith|LINK
You haven't told us what you are trying to achieve.
Create an html file with just a table in it, nothing else. One row in the table and one cell in the row. Show us the code that anyone can easily replicate. Tell us what you want it to look like and what you are seeing. Devices may also be useful - mobile?
Nov 15, 2020 11:03 PM|johnboyman12|LINK
I am trying to make a simple table but on bootstrap and on my mobile phone the table was acting up so I could not figure out why eventually I added position:relative; display:block; to style on each table column <td> then for positioning stuff like divs
inside I used position:absolute and that solved everything does anyone know why this may be. Thanks
Nov 15, 2020 11:30 PM|PaulTheSmith|LINK
Without telling us what you are trying to achieve it is difficult to explain why a random sort of vaguely described changes managed to achieve it.