grid

How do I dynamically create a collage (grid with no gaps) of images, where images have different heights?

浪尽此生 提交于 2019-12-04 21:56:51
问题 I want to display a page of thumbnails. The thumbnails are user uploaded artwork images. Each image has a constrained width, but not a constrained height, this is to show the full image without any cropping. I want the images to butt up against each other with no gaps in between. The number of columns is not fixed: If I expand or resize the page the images should flow into correct number of columns. float:left is ALMOST, what I want. Except when there are tall images in the page I get this

CSS to make a grid of cells that each fill 100% height of their row

徘徊边缘 提交于 2019-12-04 20:44:45
As shown in the example above, I'm trying to create a grid of boxes/cells. I want it to look nicer than the screenshot, and I want the bottom of each cell extend down to align with the bottom of the tallest cell in the row. I know there are about a millions posts to solve 100% height problems but none of them seem to work for this case. Requirements: No background images No javascript Must work with the following Doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> (Drupal 7) But, I'm very flexible with the markup and CSS, for example

robust, mature, extensible (JavaScript) datagrid? [closed]

梦想与她 提交于 2019-12-04 20:34:09
I'm looking for a nice client-side way of presenting data for a web application that will mostly consist of datagrids. It doesn't have to be JavaScript, but it seems to be the most logical choice, because I like JavaScript. Also, I am not considering Flex. So far I came up with the following ( <acronym title="JavaScript">JS</acronym> only): Ingrid jqGrid ExtJS grid component ExtJS grid looks the most promising, in the way that it is mature, easily-extensible and feature-rich (in-line editing, grouping, paging, etc.). Is there something out there I'm missing? You should try the grid part of the

Split screen based on number of items and screen ratio

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 20:07:45
I have to split the screen equally (as possible) given a dynamic number of items. So i need to find the number of columns and rows based on the screen size/ratio. Each item size is not important since i will calculate them in % based in the items per col and row. If i have 5 items, then (depending on the screen ratio) i will probably have 3 columns in the 1st row and 2 columns in the 2nd row. That's ok. First you have to decide what you mean with "divide the screen equally". It probably means that there is a preferred x-to-y ratio for each item. You could use the following algorithm that

Assigning border to every Grid row

半腔热情 提交于 2019-12-04 19:22:26
问题 Currently I am setting the background on each Grid row individually: <Grid> <Grid.RowDefinitions><RowDefinition /><RowDefinition /></Grid.RowDefinitions> <Grid.ColumnDefinitions><ColumnDefinition /><ColumnDefinition /><ColumnDefinition /><ColumnDefinition /><ColumnDefinition /><ColumnDefinition /></Grid.ColumnDefinitions> <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="6" Height="24" BorderBrush="#FF252A30" CornerRadius="10" BorderThickness="1"> <Border.Background> <LinearGradientBrush

Editable GRID (ExtJS) using PHP+MySQL

妖精的绣舞 提交于 2019-12-04 19:20:44
I have a little trouble with understanding of recording data to MySQL database. Now, I have some table in my DB showing in Grid. I attached an Editor, but i don't know, how to use it correctly (sending editable data into a php-script). May I ask for help? Thanks. view.js Ext.onReady(function() { var cols = [ { dataIndex: 'id', header: 'id', hidden: true }, { dataIndex: 'title', header: 'Title', width: 200, editor: 'textfield'}, { dataIndex: 'author', header: 'Author', width: 200, editor: 'textfield' }, { dataIndex: 'isbn', header: 'ISBN', width: 100, editor: 'numberfield' }, ], fields = [];

Snap to grid effect with Quartz 2d? iphone dev

我怕爱的太早我们不能终老 提交于 2019-12-04 19:19:41
Still an iphone dev starter but trying. I would like to have the user touch the screen at which point a pin (dot) will be placed on the view. I have accomplished this (yey) but i would like to have snap to grip effect, and can not come up with a solution. This is how i am placing that dot: CGPoint drawPoint = CGPointMake(lastTouch.x - horizontalOffset, lastTouch.y - >verticalOffset); [drawImage drawAtPoint:drawPoint]; //Tell the image to draw itself I have a grid as a background on a Viewcontroller, overlapping that grid i have a UIView with custom drawing that displays a pin every time the

ExtJs TreeGrid with editor column. Exists?

你离开我真会死。 提交于 2019-12-04 19:18:34
问题 I need an ability to edit values in a grid column of a treegrid. Simply adding a editor to the column's config didn't helped. I'm using ExtJs4 treepanel component. Any ideas? 回答1: Yup, it exists. I would recommend using the latest version, which at this time is 4.1 Release Candidate 1. Use an Ext.Tree.Panel add a Grid Editing plugin, like this: plugins:[ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit:2 }) ] make at least one of the columns editable like this editor:{ xtype:

css grid shortcodes and wrap in wordpress

喜欢而已 提交于 2019-12-04 19:18:24
I'm using a 12 column css grid with the classes .grid_1, .grid_2, .grid_3, .... .grid_12 I'd like to create shortcodes in wordpress. This is what I did for e.g. a 2 and 10 column style function grid_2( $atts, $content = null ) { return '<div class="grid_2">' . do_shortcode( $content ) . '</div>'; } add_shortcode('grid_2', 'grid_2'); function grid_10( $atts, $content = null ) { return '<div class="grid_10">' . do_shortcode( $content ) . '</div>'; } add_shortcode('grid_10', 'grid_10'); The problem is that those shortcodes need to be wrapped in a .row class to make it work <div class="row"> <div

Grid vs. Canvas

∥☆過路亽.° 提交于 2019-12-04 18:09:43
问题 I'm looking for opinion on using Canvas vs. Grid panels in WPF. I need to make classic input forms that have basically grid layouts, some may have small datagrids inside, groupboxes, but all aligned in grid layout. I’m struggling whether to use Grid or Canvas panel for all my forms. Grid is giving me good structure; I can maintain alignment of controls more easily¬. I will have base class (that inherits Window class) for all windows, so designer in Visual Studio will be useless, since it has