Hello guys!
I have designed my site in css. My all <div>s' position are absolute.
I have my content page and I retrieve my data from mysql database to table.
Every data appears, but it appears only until 10 data, and then,
it goes out of my content page, it goes to bottom, it becomes mixed.
How can I overcome it? I want it to appear a scroll bar, and that
I should be able to view other data too, by scrolling.
I tried to change it to relative, fixed, it becomes more mixed.
Thanks.
1 reply to this topic
#1
Posted 06 February 2012 - 08:35 AM
|
|
|
#2
Posted 06 February 2012 - 10:22 AM
I'm not sure what you mean by, when it goes to the bottom, it becomes mixed. Could you post a screenshot?
Fixed positioning will cause the element to be in a static position, regardless of how the page is scrolled, so it is of little use to you here.
I would suggest try using relative positioning. If that doesn't work, try enclosing the entire table within a div, and set the enclosing div's 'overflow' property to 'scroll'.
Example:
Fixed positioning will cause the element to be in a static position, regardless of how the page is scrolled, so it is of little use to you here.
I would suggest try using relative positioning. If that doesn't work, try enclosing the entire table within a div, and set the enclosing div's 'overflow' property to 'scroll'.
Example:
CSS:
div.scroll {
width: 100%;
height: 100%;
overflow: scroll;
}
div.element {
position: relative;
width: 80px;
height: 24px;
}
HTML:
<div class="scroll">
<div class="element" style="top: 0px; left: 0px;"> Foo1 </div>
<div class="element" style="top: 0px; left: 80px;"> Foo2 </div>
<div class="element" style="top: 0px; left: 160px;"> Foo3 </div>
...
<div class="element" style="top: 24px; left: 0px;"> FooA </div>
<div class="element" style="top: 24px; left: 80px;"> FooB </div>
...
<div class="element" style="top: 48px; left: 0px;"> Bar1 </div>
....
</div>
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









