how can I do html table left column and header fixed ?
I received this reference
http://jsfiddle.net/DJqPf/7/
I just want content scrolling
thank you
https://jsfiddle.net/Anatolium/DJqPf/1239/
I tried this but it did not
.header th {
position: fixed;
left: 5px
}
https://jsfiddle.net/Anatolium/DJqPf/1243/
and I want to make a single table
I saw this example but I can not use... because my project only for single dynamic table
http://jsfiddle.net/GnN66/2/
thank you
I did what you want exactly see the below css code & more info click the following js fiddle link
.header{float:left;width:100%;background:#fff;height:60px;}
.header tr{position:fixed;background:#fff;}
jsfiddle
Related
I would like to insert a custom footer in every page dynamically, showing date and page number.
I'm using css plugin HTML-Sheets-of-Paper to create a A4 format size.
I did a small code javascript to make the job. But, in print page the div container doesn't stay in wish position.
I know that this question can be easy to some guys, but I tried several alternatives that I could think, without success.
I got:
https://fiddle.jshell.net/gustavo_sdo/avr5jw41/2/show/
Somebody can help me?
Try changing .page-footer to
.page-footer {
position: absolute;
top: 25cm;
width: 100%;
}
Thanks to #robert-eckhaus for the answer.
From this I got to the css that solved my question.
The final result and the code can be seen here:
https://fiddle.jshell.net/gustavo_sdo/avr5jw41/4/show/
i need to create a table with the first column fixed and the rest of the columns scrollable horizontally.
I managed to implement this successfully BUT when i implement it in my website it doesn't seem to be working.
when i make the table head fixed, the first column breaks the layout
when i use this with a plain table it works but not with my theme
.table-wrapper th:first-child {
position: fixed;
left: 5px
}
Table which works without the css : http://www.vidznet.com/table/2.html
Table with css : http://www.vidznet.com/table/1.htm
can someone tell me what might be conflicting?
Update:
what i need is the first column to be fixed and the scrollbar to start from the second column like this
It should be like this: http://vidznet.com/table/table1.jpg
but in my css theme it looks like this http://vidznet.com/table/table2.jpg
The problem is with your CSS property:
.table.table-striped > thead:first-child > tr > th:first-child {
width: 25%;
text-align: left;
}
The width is too large for the column. It needs to be changed to 5 to 12%, depending on how you want how far you want the underline to go, to fit in with the other fixed elements.
I've been trying to properly place an element into my page so that it doesn't obstruct the background and so that it aligns all the way to right. I've tried to recreate the scenario on this jsfiddle, but I couldn't recreate it exactly.
There is a lot of junk included, but to create the layout of the actual page, I had to included it. My problem is with .login in the style and how it is interacting with the other elements. I've tried screwing with position, but I haven't been able to achieve my desired result.
Here is a screenshot of what it looks like with the problem:
This is what I would like:
Thanks for any help!
Try this
.login {
position: absolute;
top: 0; // or what you need
right: 0;
z-index: 1; // i don't know if you need upper value for that
}
In my html document, I am using the table elements to create a sort of photo collage grid. When I change the z-index to -1 for my post it just cuts off the document and you have to scroll to see it, this is very confusing, please help. Thanks
Here is my jsfiddle of it
Have you noticed your ordered list div #posts is the direct child of body? Just remove the style of body like height: 100%; background: #e1e1e1; and it'll work. Hope this works for you.
i'm new to html and i'm having problems moving the table down the page. http://tinypic.com/view.php?pic=eqdpjb&s=7 . I tried setting the 'margin-top: 400;' which works however the navigation bar at the top (i created in dreamweaver using the navigation 'wizard') moves as well to the bottom of the page!. How can i fix this? i want to move only the table without affecting the navigation bar been driving me nuts!
css
table{
background: whitesmoke;
border-collapse: collapse;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
}
Your problem is that your navigation is positioned relatively to your table so when you add a margin also the navigation gets the margin.
The solution would be to add a minus margin to your navigation, as shown here:
#navigationId {
margin-top: -400px;
}
If you are adding margin-top: 400px; to table and it also moves the navigation, then that either means the navigation is also a table or the navigation is within the table.
If the navigation is also a table you will have to give the bottom table a unique id and then add the margin to that id only.
If the navigation is within the table, put it in its own div.
If it's none of the above you will have to post some HTML.
Try this:
table {
background: whitesmoke;
border-collapse: collapse;
margin-right: auto;
vertical-align: bottom;
margin-left: auto;
}
Hope it works for you! :)
Longer term, I advise you to learn to hand code using an ide such as netbeans or a simple editor such as notepad++. Using dreamweaver is all very well but unless you understand how the code works you will always encounter similar frustrations. A great resource to learn html and css is w3schools www.w3schools.com
A very good book on css is css the missing manual (o'reilly)
You may find all this slower in the beginning but you will end up writing cleaner and faster code as a result.
Make sure the table and the navigation bar are in two separate tags, which are both in a third div.
By using margin-top on the div with the table, you will force that entire div down from the top of that third container div.
Make sure to get rid of the margin-top stuff in the table css declaration.
Eg.
Navigation code here.
Table here