Positioning table header in div - html

See my fiddle here.
I am trying to position the header inside the div like so:
Not having much luck. What's going on? How do position within the table row header?

That div.headerContainer is not valid markup so the browser will try to correct it. Rather style the th 's and add classes for first and last. Here is an example. Another option would be to use an appropriately sized background image and apply it to the parent div (.geniusPicks)
HTH! :)

Related

How to position element next to another without modifying styling to the first element?

CSS is still fairly new to me. I have a div element and want to define a button element that would be placed right of the div element. However, I want to do this without modifying any of the styling of the div element. Is this possible? Edit: If yes, please show me an example :)
You can use position:absolute for that element and align it using right/left and top/bottom css rules, this will align the element relative to the entire webpage (or nearest position:relative parent), but what you're looking for is usually done by making both elements float:right/left or display:inline-block. Note that the '/' in my answer indicate your choices, not actual css directives.
Simple add the
float:left
or
float:right
to style it will work fine and display after one and other.

z-index not working with overflow to overlap and scrollbar

I got the following issue:
I'm trying to display a few <div.content> with content in it. Limited in size to a <div.holder> as parent with overflow set, so that you can scroll down to see all <div.content>. The <div.content> are overlapping the <div.holder> for styling purpose. And everything is wrapped in a <div.container>.
But the <div.content> won't display over the <div.holder> element with z-index or anything. It's rendered inside the <div.holder> element, without scrollbar it's rendered outside, like i want.
How can i get the Scrollbar and that the <div.content> will overlap its parent <div.holder>?
Here's the Fiddle for the issue. Thank you.
EDIT:
Trying to accomplish this:
For this styling purpose:
Is this even possible? I'm not bound to just use HTML&CSS, just need that thing start working.
Z-index will only work on elements with position. So its not doing anything to .foo
http://www.w3schools.com/cssref/pr_pos_z-index.asp

Repeat similar html layout vertically along a page

I have a html layout done using absolutely positioned div elements and a backgroung image. I want to keep the layout the same vertically (each individual part/page representing a data set). I do not wan't to change the div positioning from absolute as this messes up things and I am running out of time for this.
I realize I can have multiple body tags each for every data set and as this html will finally be generated from xml using xslt this is not a problem.
The issue is that as the div elements are absolute they do not appear in the subsequent body tag (only background image appears). I tried changing to relative and the div actually moves to 'next page' (body element), but as there are several divs, when all are laid out they get misaligned.
I will be grateful for some advice on how to tackle this either by fixing my html in some way that will not be too time consuming or by using a tool that can combine several html content in to one flowing page. Any other piece of advice is also very welcome.
From what you've posted, which could really use some of your HTML as an example of what you're trying to do exactly, you should be able to simply wrap each of your "pages" in a div with the position: relative CSS style.
The inner content will then be positioned absolutely from the boundaries of its parent wrap. You would then want to move most of the styles you currently have applied to your body element (like a background image) to the wrapper divs.
Basic example: http://jsfiddle.net/AsWCN/2/

display:table in a div not showing like a table

http://img580.imageshack.us/img580/1811/sinttulooh.png
I have the problem you see in the picture. That's a div with three columns. This div has a display:table property, and every column has a display:table-cell property. The problem is that, as you see, the left and right columns begin their content when the middle one has finished its content, and they should start writing from the top, as the middle column.
I don't know why it behaves like that, because there is no conflict with any other rule in the rest of the CSS. And I've seen in other examples that it is not necessary to define table-column or table-row to get that style.
How should I declare the divs to get the desired structure?
Here is the code: http://jsfiddle.net/3fMM3/2/
You don't need tables there and also you don't need to make put display:table.
Just use css styling to make a three column layout, this is what appears you want to achive.
Check this link for example :
http://matthewjamestaylor.com/blog/perfect-3-column.htm
Here's a working example :
http://jsfiddle.net/NyqGQ/1/
Note the "border-collapse" property, to merge container's and children border.
Try to set the vertical-align property to top on your table-cells.
.your-table-cells
{
vertical-align:top;
}

Keeping HTML div in one place

I want to keep several divs at one place and want to show them on clicking on the respective buttons but they are coming in a row format. Actually I want to keep then overlapping each another.
You have to use absolute positioning and z-index to put one on top of the other.
Check this example, and modify z-index to see how it changes:
http://jsfiddle.net/Pizzicato/LgN9z/
You can do it with absolute CSS positioning. Here is tutorial on this topic with examples. Overlapping of HTML elements is done through z-index CSS property.