Please go through fiddle. Here I am presenting the information TV seasons in the form of lists. I am managing these lists to appear next-each-other through setting FLOAT left/right. Some-how few of the lists are not appearing properly.
Any assistance is appreciated.
You can check fiddle
You cannot acheive that look-n-feel with current structure of HTML and css. You will need to
Create columns - for now I have created 3 columns - you may create as many columns as you want. Further these number of columns can be made specific to RESPONSIVE WEB BREAKPOINTS if you want to make this page responsive.
Associate season lists to each column
Apply float:left to each column
Get rid of lef and right div classes
Rather apply this float to columns as mentioned in # 3
Please visit the demo # https://jsfiddle.net/zm11awhq/5/embedded/result/
If you dont want to use columns then you will need to give min-height to each season's div. This min-height will remain standard for all the sasons so floating will take place very properly. But this will keep lot of white space on the page.
I figured it out by myself i just added clear: left; on left class and clear: right; on right class it fix`s the season which isnt displayed correctly and rest will shows as it is.
Thank you for everyone of your help.
Related
I have a QGridLayout with QLabels in it that are displaying some values and the units to that values. For good readability I want the value to be left-aligned within the QLabel and the unit to be right-aligned.
At first I wanted to do this with QtStyleSheets but the only way I found was to change the text-alignment of the whole widget like this:
myLabel.setStyleSheet("QLabel {qproperty-alignment: AlignRight}")
My second thought was to do it via HTML but there I also encountered several problems. Here is what I tried:
myLabel.setText("<div align=\"left\">Value<\div><div align=\"right\">Unit<\div>")
This does the right thing, after that the value is left-aligned and the unit right-aligned, but they are not on the same line anymore. Nevertheless it appears to me the more promising approach. Unluckily I am not very familiar with HTML.
Can anybody help?
Or if you really just want go on with html in QLabel use table instead of div's. But #saeed is right, better use Qt Layouts and spacer between them.
Example with HTML:
myLabel.setText("<table width=\"100%\"><td width=\"50%\" align=\"left\">Value</td><td width=\"50%\" align=\"right\">Unit</td></table>");
I suggest you to use two Qlabels and a Horizontal spacer like image below , this is fast and you can let Qt handle whole design layout.
I am kind of a Newbie in nattable, I want change the alignment of first header column in nattable to the left and the rest remain on the right, I know that alignment is generally defined like this:
this.cHeaderHAlign = HorizontalAlignmentEnum.RIGHT;
Is it possible and How can I do it?
From your code snippet it looks like you are referring to theme configurations. But without going into details how this can be done using themes you need to understand how the basics are working.
In general you need to add a custom label to the first column in the column header and then apply a style object with the needed alignment for that label.
Have a look at the NatTable - Getting Started Tutorial to get an idea how this can be achieved.
I'm using FullCalendar with the resource library that you can see in my JSFIDDLE
How you can see the problem of the resource (first column, second column) is the overlapping. Seems infact if the resource have a long name go to overlap the near column and this is bad for me. What I want is cut the resource name if exceeds a certan lenght, anyway, the label must not overlap the next cell.
Issue image:
Final result
Something like: First col | Second col
You seem to want to hide the overflow.
Your calendar's table header elements are overflowing into each other.
CSS:
#calendar tr th div.col-label{
overflow-x: hidden;
}
This will make the overflowing text not draw instead of drawing on the next cells.
EDIT: Fixed this making the events disappear
EDIT 2: Fixed messing up the Date Label
Another way to solve your problem is by setting a min-width property on your columns in order to ensure that each one will have enough space available to store it's data. And then use width:100%; property on your labels. Maybe use some padding as well in order to make it look nice. Let me know if this helped :)
http://weknowwhatyouredoing.com/
I'm trying to make a table like this one where I have a profile image to the left, a bold title/name and text underneath the bold title/name, and date/time stamp underneath that... basically the same views as on that website (http://weknowwhatyouredoing.com/) or better (or twitter tweets).
Anybody know of any tutorials on how accomplish this? I'm currently using table with multiple columns but it seems that when one cell is big, all the cells in that row become the same height and i don't like that. In android this is called a list view but i'm not sure what it is in the html/css world, any help please? Thanks in advance
You could make multiple tables floating next to each other. The elements on the website you show aren't aligned as fa as I can tell.
A tutorial on rowspan and colspan can be found here.
If you make the image span 3 rows, you can put the bold text, content and date stamp each into one row. With valign you can vertically position elements within a row if the row becomes higher than the content. This will probably happen if the 3 rows together are higher than the one spanning row containing the image.
As a quick fix for your issue with the equal row heights, you could use the same layout method as they use on weknowwhatyouredoing.com.
Wrap each column in a separate <div>, and then place your <table> inside.
4 containers, 4 tables with independent row heights.
You shall give a look at the Twitter Bootstrap CSS library Twitter Bootstrap
It's pure HTML5/CSS using only divs.
for improve your knowleges in HTML, you can see W3C (Word Wibe Web Consortium) specs. For sample, if you see this page, W3C explain all structure, attributes, for Table element.
You can find lot of tutorial in google ( search "tutorial create Table HTML" ).
Also, you can help you to understand website structure with browser plugins that display hover element in specific website. ( firebug for Firefox and Chrome, Dragonfly for Opera browser...)
Why not use multiple list elements? Tables definitely don't give you flexibility for responsive designs. Making multiple columns of list elements can be rearranged as needed with limited restrictions
I'm trying to re-make an existing ASP.Net page which generates labels. The original uses hideous tables-within tables-within tables to force a layout, and as our order quantity has increased it's now got to the point where it's spitting out 65k lines of HTML assuming it doesn't time out first.
I've replaced it with an unordered list for my list of lables, with each list item floated, and the on-screen layout is now perfect. For print, it's 4 labels per page, one in each corner.
However, at least in IE-land, go to print preview and it goes back to being a vertical list.
Any thoughts?
make sure you are using a float:... in your css of li class it will fix it :)
Let me know if that helps
Changed from UL/LI elements to the ubiquitous DIV, and placed every set of 4 inside a container which did the job. Still none the wiser about why FireFox, Chrome and IE all ignored float:left in print though, but it's working now.