Search Results

Search found 11930 results on 478 pages for 'media center'.

Page 145/478 | < Previous Page | 141 142 143 144 145 146 147 148 149 150 151 152  | Next Page >

  • HTML/CSS: Creating a centered div with a min-width

    - by Alessandro Vernet
    I'd like to have on my page a div which is centered and has a certain width, but which extends beyond that width if required by the content. I am doing this with the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> .container-center { text-align: center; } .container-minwidth { min-width: 5em; display: inline-block; border: 1px solid blue; } </style> </head> <body> <div class="container-center"> <div class="container-minwidth"> a </div> </div> </body> </html> This works great on Firefox/Safari, but not on IE6, which doesn't understand the display: inline-block. Any advice on how to make this work on IE6 as well?

    Read the article

  • Resizing a container when child's visibility is changed?

    - by deux11
    When I set the visible property to false for a child in a container, how can I get the container to resize? In the example bellow, when clicking on "Toggle", "containerB" is hidden, but the main container's scrollable area is not resized. (I do not want to scroll through a lot of empty space.) <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ public function toggle():void { containerB.visible = !containerB.visible; } ]]> </mx:Script> <mx:VBox height="300" width="200" horizontalAlign="center"> <mx:Button label="Toggle" click="toggle()" width="200"/> <mx:VBox id="containerA" height="400" width="150" horizontalAlign="center"> <mx:Button label="A" height="400" width="100"/> </mx:VBox> <mx:VBox id="containerB" height="400" width="150" horizontalAlign="center"> <mx:Button label="B" height="400" width="100"/> </mx:VBox> </mx:VBox>

    Read the article

  • Button Template does not render Image clearly.

    - by Akash Kava
    Here is my button template, <Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" RenderDefaulted="{TemplateBinding IsDefaulted}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Image Source="{TemplateBinding ImageSource}" RenderOptions.BitmapScalingMode="NearestNeighbor" SnapsToDevicePixels="True" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" /> <ContentPresenter Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True"/> </Grid> </Microsoft_Windows_Themes:ButtonChrome> Now you can see as per this question My Images are blurry on StackOverflow I tried .. RenderOptions.BitmapScalingMode="NearestNeighbor" On all levels, grid, chrome .. and tried various combinations of SnapsToDevicePixels but images just wont show up correctly. I set Stretch=None, image is aligned at center, still why it stretches automatically? here is the output and its very frustrating. Actual size of the image is 16x16 but I some how figured out by using Windows Maginifier that no matter what I do, the image is actually trying to render as 20x20, for the bigger images its even cropping the right most and bottom part. I think image should be rendered correctly 16x16 when Stretch=None, can anyone clarify whats problem here?

    Read the article

  • How can I handle unread push notifications in iOS?

    - by Bartserk
    I have a iOS 5.1 application that registers to the APNS service to receive notifications. The register is successful and I receive the notifications correctly. The problem comes when I try to handle the notifications. Once the application is running, the method didReceiveRemoteNotification in the AppDelegate is called correctly and so the notification is handled as intended. This, however, only happens when the application is running on the foreground. However, when the application is running on the background or is simply stopped, that method is not called. I've read that you should add some lines to the method didFinishLaunchingWithOptions method to obtain the notification from the userInfo dictionary, and handle it. This works just fine, but ONLY when the application is opened by clicking on the notification at the Notification Center. This means that if you open the application by clicking on its badge, or simply by changing context if you were running it on the background, the app never realises that a notification came in. Additionally, if more than one notification was received, we can only handle one of them at once by clicking on the Notification Center, which is a pain :-) Is there any way to read the pending notifications in the Notification Center? I know there is a way to flush them using the method cancelAllLocalNotifications but I haven't found a way to just read them. And I really need to handle all of them. I thought of implementing a communication protocol with the third-party notification server to retrieve the information again when the application comes to the foreground, but since the information is already in the operating system I would find it strange if it's impossible to access it somehow. So, does anybody know a way to do it? Thanks in advance.

    Read the article

  • how to text-align columns in DataGrid? (style DataGridCell)

    - by Olga
    I use WPF (C #). I use DataGrid. I want the first column is aligned with the center, the other columns are right-aligned. I have style: <Style x:Key="TextInCellCenter" TargetType="{x:Type TextBlock}" > <Setter Property="HorizontalAlignment" Value="Center"/> </Style> <Style TargetType="{x:Type DataGridCell}"> <Setter Property="HorizontalAlignment" Value="Right"/> </Style> DataGrid: <DataGrid> <DataGrid.Columns> <DataGridTextColumn ElementStyle="{StaticResource TextInCellCenter}" Binding="{Binding Path=Name}" /> <DataGridTextColumn Binding="{Binding Path=Number}" /> <DataGridTextColumn Binding="{Binding Path=Number}" /> <DataGridTextColumn Binding="{Binding Path=Number}" /> I have all the columns are right-aligned. Please tell me, how do I change the first column had a center text-alignment?

    Read the article

  • Geohashing - recursively find neighbors of neighbors

    - by itsme
    I am now looking for an elegant algorithm to recursively find neighbors of neighbors with the geohashing algorithm (http://www.geohash.org). Basically take a central geohash, and then get the first 'ring' of same-size hashes around it (8 elements), then, in the next step, get the next ring around the first etc. etc. Have you heard of an elegant way to do so? Brute force could be to take each neighbor and get their neighbors simply ignoring the massive overlap. Neighbors around one central geohash has been solved many times (here e.g. in Ruby: http://github.com/masuidrive/pr_geohash/blob/master/lib/pr_geohash.rb) Edit for clarification: Current solution, with passing in a center key and a direction, like this (with corresponding lookup-tables): def adjacent(geohash, dir) base, lastChr = geohash[0..-2], geohash[-1,1] type = (geohash.length % 2)==1 ? :odd : :even if BORDERS[dir][type].include?(lastChr) base = adjacent(base, dir) end base + BASE32[NEIGHBORS[dir][type].index(lastChr),1] end (extract from Yuichiro MASUI's lib) I say this approach will get ugly soon, because directions gets ugly once we are in ring two or three. The algorithm would ideally simply take two parameters, the center area and the distance from 0 being the center geohash only (["u0m"] and 1 being the first ring made of 8 geohashes of the same size around it (= [["u0t", "u0w"], ["u0q", "u0n"], ["u0j", "u0h"], ["u0k", "u0s"]]). two being the second ring with 16 areas around the first ring etc. Do you see any way to deduce the 'rings' from the bits in an elegant way?

    Read the article

  • JavaScript doesnt work on Kohana with google maps engine line

    - by user2902495
    <div style="width: 1200px; height: 750px;"> <iframe src="http://mapsengine.google.com/map/embed?mid=zkh_WUG-PAC0.k8Xr_3BhSQ00" width="640" height="480" <script type="text/javascript"> //<![CDATA[ function load() { /* ???????? ?? ????????????? ? ???????????? ?????????*/ if (GBrowserIsCompatible()) { /* ??????? ????? - ????? */ var pntx=37.62039542198181; var pnty=55.75294375419617; var center = new GLatLng(pnty, pntx); /* ???????? ??????? ?????, googlemap - ???, ?? ???????? ????????? ?????? ?????, ??????????? ????*/ var map = new GMap2(document.getElementById("mapgoogle")); } } //]]> </script> > </iframe> ... <body onload="load()" onunload="GUnload()"> <div align="center"><div id="mapgoogle" style="width: 90%; height: 500px;"></div></div> </body> </div> a point does not take place on the center of map ?????, and not the alone from Javascript does not work! help to correct!

    Read the article

  • JPA - Real primary key generated ID for references

    - by Val
    I have ~10 classes, each of them, have composite key, consist of 2-4 values. 1 of the classes is a main one (let's call it "Center") and related to other as one-to-one or one-to-many. Thinking about correct way of describing this in JPA I think I need to describe all the primary keys using @Embedded / @PrimaryKey annotations. Question #1: My concern is - does it mean that on the database level I will have # of additional columns in each table referring to the "Center" equal to number of column in "Center" PK? If yes, is it possible to avoid it by using some artificial unique key for references? Could you please give an idea how real PK and the artificial one needs to be described in this case? Note: The reason why I would like to keep the real PK and not just use the unique id as PK is - my application have some data loading functionality from external data sources and sometimes they may return records which I already have in local database. If unique ID will be used as PK - for new records I won't be able to do data update, since the unique ID will not be available for just downloaded ones. At the same time it is normal case scenario for application and it just need to update of insert new records depends on if the real composite primary key matches. Question #2: All of the 10 classes have common field "date" which I described in an abstract class which each of them extends. The "date" itself is never a key, but it always a part of composite key for each class. Composite key is different for each class. To be able to use this field as a part of PK should I describe it in each class or is there any way to use it as is? I experimented with @Embedded and @PrimaryKey annotations and always got an error that eclipselink can't find field described in an abstract class. Thank you in advance! PS. I'm using latest version of eclipselink & H2 database.

    Read the article

  • Column Header Styling Issue in Data Grid in WPF

    - by sbrakl
    I have formated the Wcf Toolkit Datagrid and below in the is the ColumnHeader Style for it But, there are still some area in Column Header, which are not styled as shown in the image http://www.freeimagehosting.net/uploads/9aba4fbd93.jpg <Style x:Key="ColumnHeaderStyle" TargetType="{x:Type dg:DataGridColumnHeader}"> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Background" Value="Orange" /> <Setter Property="Foreground" Value="White" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="dg:DataGridColumnHeader"> <dg:DataGridHeaderBorder x:Name="headerBorder" Background="Orange"> <Border BorderThickness="2" CornerRadius="5" Background="Orange" BorderBrush="DarkOrange"> <Grid> <TextBlock Text="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"/> </Grid> </Border> </dg:DataGridHeaderBorder> </ControlTemplate> </Setter.Value> </Setter> </Style> <dg:DataGrid Grid.Row="1" Grid.RowSpan="1" Name="dgQuestion" HorizontalAlignment="Left" AutoGenerateColumns="True" Width="740" MinWidth="200" MaxWidth="740" Background="Wheat" ColumnHeaderHeight="30" ColumnHeaderStyle="{DynamicResource ColumnHeaderStyle}" RowStyle="{StaticResource RowStyle}" CanUserAddRows="False" CanUserDeleteRows="False" AlternationCount="2"/>

    Read the article

  • Python for statement giving an Invalid Syntax error with list

    - by Cold Diamondz
    I have some code in which is throwing an error (I'm using repl.it) import random students = ['s1:0','s2:0','s3:0'] while True: print'\n'*50 print'Ticket Machine'.center(80) print'-'*80 print'1. Clear Student Ticket Values'.center(80) print'2. Draw Tickets'.center(80) menu = raw_input('-'*80+'\nChoose an Option: ') if menu == '1': print'\n'*50 print'CLEARED!' students = ['s1:0','s2:0','s3:0'] raw_input('Press enter to return to the main menu!') elif menu == '2': tickets = [] print'\n'*50 times = int(raw_input('How many tickets to draw? ') for a in students: for i in range(a.split(':')[1]): tickets.append(a.split(':')[0]) for b in range(1,times+1): print str(b) + '. ' + random.choice(tickets) else: print'\n'*50 print'That was not an option!' raw_input('Press enter to return to the main menu!') But it is throwing this error: File "<stdin>", line 19 for a in students: ^ SyntaxError: invalid syntax I am planning on using this in a class, but I can't use it until the bug is fixed, also, student names have been removed for privacy reasons.

    Read the article

  • Updating a field in a record dyanamically in extjs

    - by Daemon
    Scenario I want to update the column data of particular record in grid having store with static data. Here is my store: : : extend : 'Ext.data.Store', model : 'MyModel', autoLoad:true, proxy: { type: 'ajax', url:'app/data/data.json', reader: { type: 'json', root: 'users' } }, My data.json { 'users': [ { QMgrStatus:"active", QMgrName: 'R01QN00_LQYV', ChannelStatus:'active', ChannelName : 'LQYV.L.CLNT', MxConn: 50 } ] } What I am doing to update the record : var grid = Ext.getCmp('MyGrid'); var store = Ext.getStore('Mystore'); store.each(function(record,idx){ val = record.get('ChannelName'); if(val == "LQYV.L.CLNT"){ record.set('ChannelStatus','inactive'); record.commit(); } }); console.log(store); grid.getView().refresh(); MY PROBLEM I am getting the record updated over here.It is not getting reflected in my grid panel.The grid is using the same old store(static).Is the problem of static data? Or am I missing something or going somewhere wrong? Please help me out with this issue.Thanks a lot. MY EDIT I am tryng to color code the column based on the status.But here I am always getting the status="active" even though I am updating the store. What I am trying to do in my grid { xtype : 'grid', itemId : 'InterfaceQueueGrid', id :'MyGrid', store : 'Mytore', height : 216, width : 600, columns : [ { text: 'QueueMgr Status', dataIndex: 'QMgrStatus' , width:80 }, { text: 'Queue Manager \n Name', dataIndex: 'QMgrName' , width: 138}, { text: 'Channel Status',dataIndex: 'ChannelStatus' , width: 78,align:'center', renderer: function(value, meta, record) { var val = record.get('ChannelStatus'); console.log(val); // Here I am always getting status="active". if (val == 'inactive') { return '<img src="redIcon.png"/>'; }else if (val == 'active') { return '<img src="greenIcon.png"/>'; } } }, { text: 'Channel Name', align:'center', dataIndex: 'ChannelName', width: 80} { text: 'Max Connections', align:'center', dataIndex: 'MxConn', width: 80} ] }

    Read the article

  • auto refresh of div in mvc3 ASP.Net not working

    - by user1493249
    ViewData.cshtml(Partial View) Date Bill Amount PayNow </tr> </thead> <tbody> @{ for (int i = @Model.bill.Count - 1; i >= 0; i--) { <tr> <td width="30%" align="center">@Model.billdate[i]</td> <td width="30%" align="center">@Model.bill[i]</td> <td width="30%" align="center"> <a class="isDone" href="#" data-tododb-itemid="@Model.bill[i]">Paynow</a> </td> </tr> } } </tbody> Index.cshtml(View) $(document).ready(function () { window.setInterval(function () { var url = '@Url.Action("SomeScreen", "Home")'; $('#dynamictabs').load(url) }, 9000); $.ajaxSetup({ cache: false }); }); @Html.Partial("ViewData") HomeController.cs(Controller) public ActionResult Index() { fieldProcessor fp= new fieldProcessor(); return View(fp); } public ActionResult ShowScreen() { return View("ViewData",fp); } Still the same is not working..

    Read the article

  • Alignment for 2nd row data

    - by user1736299
    <table> <tr><td>test</td></tr> <tr> <td> <div style= height:200px;"> <div style="border:1px solid yellow; display: inline-block; width:100px"> <img src="orderedList4.png"> </div> <div align="center" style="border:1px solid green; display: inline-block; width:650px;height:100px;"> <div>center Test Header1</div> <div>center Test Header2</div> </div> <div align="right" style="border:1px solid red;display: inline-block; width:100px">REL 1.0</div> </div> </td> </tr> </table> In the above code, the image size is 75*75 pixels. I want to have all the three cells to have a height of 100 pixels. I want the image to be centered and left aligned. The middle text to centered. Third text to centered and right aligned. I could not make it working.

    Read the article

  • How to set default view in OpenLayers, WITHOUT restricting bounds?

    - by Jenny
    Based on samples, I can see that you can set a default view in OpenLayers by saying something along the lines of: var bounds = new OpenLayers.Bounds(-125, 25, -65, 50); var map = new OpenLayers.Map('map', {restrictedExtent: bounds }); However, this also (as the name implies), restricts me to be able to ONLY navigate within these bounds. I can zoom out and see things outside of these bounds, but I can't then zoom back onto them, or scroll to them. I've tried not having any restrictedExtent (or making it the entire map), but then I can't get it to focus on the area I want. I tried using: map.setCenter(new OpenLayers.LonLat(0,0), 3); console.log(map.getCenter()); To set the zoom and the center...but it doesn't seem to do ANYTHING, other than set the variable "center" which I can then read from map.getCenter() (if I don't set it, it's null, if I do set it, I can see it...but the map itself stays fully extended and it's center doesn't seem to change at all...) The Map layer I am using is: OpenLayers.Layer.OSM.Mapnik with displayOutsideMaxExtent set to true... I'm really at a loss here. My goal is to have a default region of the world zoomed in to and in view (such as the United States), with the option of viewers being able to go outside the default to view things.

    Read the article

  • paginate the class

    - by small
    please help me with pagination of this method my method is this one controller # def show @topic = Topic.find(params[:id]) @posts = @topic.posts.find(:all ,:order=> 'id') end views # %div{:style=>"margin: 0 auto;"} %table.sortable.style2{:cellpadding=>5} %thead %tr %td{:width => "25%",:align => "center",:style => "font-weight: bold;"}Posted By %td{:width => "75%",:style => "font-weight: bold;"}Comments %tbody - for post in @posts %tr %td{:align => "center"} &nbsp %div{:width=>"5px" , :style=>"border: 1px solid rgb(232, 232, 232);background-color: rgb(248, 248, 248);width: 60px; height:60px;" } - if post.posted_by.image = image_tag(post.posted_by.image.public_filename(),:width => "60px", :height => "60px",:align=>"center") %div{:style => "font-weight: bold; font-style: italic;"} = post.posted_by ? post.posted_by.firstname : "<em>Unknown User</em>" %br %div{:style => "font-style: italic;"} Posted on = post.created_at.strftime('%d of %B %Y ') = post.created_at.strftime('at %H:%M') %td{:valign => "top"} =post.body

    Read the article

  • Using "margin: 0 auto;" in Internet Explorer 8

    - by stusmith
    I'm in the process of doing some advance IE8 testing, and it seems that the old technique of using "margin: 0 auto;" doesn't work in all cases in IE8. The following piece of HTML gives a centered button in FF3, Opera, Safari, Chrome, IE7, and IE8 compat, but NOT in IE8 standard: <div style="height: 500px; width: 500px; background-color: Yellow;"> <input type="submit" style="display: block; margin: 0 auto;" /> </div> (As a work-around I can add an explicit width to the button). So the question is: which browsers are correct? Or is this one of those cases where the behaviour is undefined? (My thinking is that all the browsers are incorrect - shouldn't the button be 100% width if it's "display: block"?) UPDATE: I'm being a dunce. Since input isn't a block-level element, I should have just contained it within a div with "text-align: center". Having said that, for curiosity's sake, I'd still like to know whether the button should or shouldn't be centered in the example above. FOR THE BOUNTY: I know I'm doing odd things in the example, and as I point out in the update, I should have just aligned it center. For the bounty, I'd like references to the specs that answer: If I set "display: block", should the button be width 100%? Or is this undefined? Since the display is block, should "margin: 0 auto;" center the button, or not, or undefined?

    Read the article

  • How to get unique value in jquery?

    - by jquerier
    I am learning jquery. I have following chunk of code in a html file: <table width="100%"> <tr> <td align='center'> <div> <a id='get_this' href='#'> <input type='hidden' id='id' value='1'><img src='images/1.gif'></a> </div> </td> <td align='center'> <div> <a id='get_this' href='#'> <input type='hidden' id='id' value='2'><img src='images/2.gif'></a> </div> </td> <td align='center'> <div> <a id='get_this' href='#'> <input type='hidden' id='id' value='3'><img src='images/3.gif'></a> </div> </td> </tr> What I want to do is, when I click any of the image, I can get the value, so that I can display the information. For example, I click the id=1, then I will display information on id1 in somewhere else. I tried this: $("a#get_this").click(function(){ var id = $('input[type=hidden]#id').val(); window.alert("You have chosen the id: " + id); }); It always return id: 1 to me.

    Read the article

  • NSMutableArray accessing issue.

    - by Danegraphics
    I've searched and have no answer. I've created an NSMutableArray and am getting an EXC_BAD_ACCESS error in one place of access. Here. This is declaring in the .h file: NSMutableArray *buttons; ... @property (nonatomic, retain)NSMutableArray *buttons; And this is the synthesizing and implimenting: @synthesize buttons; ... - (id)init { self = [super init]; if(self != nil) { buttons = [[NSMutableArray alloc] init]; } return self; } ... -(void)addButtonWithImage:(Image*)image { Image *button = image; [buttons addObject:button]; [button release]; } ... -(void)replaceButtonAt:(int)num with:(Image*)image { Image *button = image; [buttons replaceObjectAtIndex:num withObject:button]; <<===EXC_BAD_ACCESS [button release]; } But when I use this: -(void)renderButton:(int)num atPoint:(CGPoint)point center:(BOOL)center{ Image *button = [buttons objectAtIndex:num]; [button renderAtPoint:point centerOfImage:center]; } It works

    Read the article

  • Undefined javascript function?

    - by user74283
    Working on a google maps project and stuck on what seems to be a minor issue. When i call displayMarkers function firebug returns: ReferenceError: displayMarkers is not defined [Break On This Error] displayMarkers(1); <script type="text/javascript"> function initialize() { var center = new google.maps.LatLng(25.7889689, -80.2264393); var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP }); //var data = [[25.924292, -80.124314], [26.140795, -80.3204049], [25.7662857, -80.194692]] var data = {"crs": {"type": "link", "properties": {"href": "http://spatialreference.org/ref/epsg/4326/", "type": "proj4"}}, "type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [25.924292, -80.124314]}, "type": "Feature", "properties": {"industry": [2], "description": "hosp", "title": "shaytac hosp2"}, "id": 35}, {"geometry": {"type": "Point", "coordinates": [26.140795, -80.3204049]}, "type": "Feature", "properties": {"industry": [1, 2], "description": "retail", "title": "shaytac retail"}, "id": 48}, {"geometry": {"type": "Point", "coordinates": [25.7662857, -80.194692]}, "type": "Feature", "properties": {"industry": [2], "description": "hosp2", "title": "shaytac hosp3"}, "id": 36}]} var markers = []; for (var i = 0; i < data.features.length; i++) { var latLng = new google.maps.LatLng(data.features[i].geometry.coordinates[0], data.features[i].geometry.coordinates[1]); var marker = new google.maps.Marker({ position: latLng, title: console.log(data.features[i].properties.industry[0]), map: map }); marker.category = data.features[i].properties.industry[0]; marker.setVisible(true); markers.push(marker); } function displayMarkers(category) { var i; for (i = 0; i < markers.length; i++) { if (markers[i].category === category) { markers[i].setVisible(true); } else { markers[i].setVisible(false); } } } } google.maps.event.addDomListener(window, 'load', initialize); </script> <div id="map-container"> <div id="map"></div> </div> <input type="button" value="Retail" onclick="displayMarkers(1);">

    Read the article

  • How Are These Styles Cascading?

    - by user1569275
    Problem is viewable at this link. http://dansdemos.info/prototypes/htmlSamples/responsive/step08_megaGridForward.html The three boxes need to have green backgrounds, but another style is taking precedence. I thought styles were supposed to take precedence based on where they appear in the style sheets, with styles lower in the style sheet cascading (taking precedence) over styles higher in the style sheet. I guess that is wrong, because the style sheet for the background colors of those boxes is here: #maincontent .col { background: #ccc; background: rgba(204, 204, 204, 0.85); } #callout1 { background-color: #00B300; text-align:center; } #callout2 { background-color: #00CC00; text-align:center; } #callout3 { background-color: #00E600; text-align:center; } When the style for "#maincontent .col" is removed, the green shows up (link)http://dansdemos.info/prototypes/htmlSamples/responsive/step08_megaGridForwardGreen.html, but I thought the green should show up because it is after the gray color specified higher up. I am finding a way to get what I need, but it would really make it a lot easier if I understood why the backgrounds are gray, instead of green. Any assistance would be extremely much appreciated. Thank you.

    Read the article

  • How find all overlapping circles from radius of central circle?

    - by roza
    How to do an intersection or overlap query in mongo shell - what circles overlap my search region? Within relate only to the center position but doesn't include radius of the other circles in searched scope. Mongo: # My bad conception: var search = [[30, 30], 10] db.places.find({circle : {"$within" : {"$center" : [search]}}}) Now I can obtain only this circles within central point lies in searched area of circle: Ruby: # field :circle, type: Circle # eg. [ [ 30, 30 ], 10 ] field :radius, type: Integer field :location, :type => Array, :spatial => true spatial_index :location Places.within_circle(location: [ [ 30, 30 ], 10 ]) # {"$query"=>{"location"=>{"$within"=>{"$center"=>[[30, 30], 10]}}} I created example data with additional location (special index) and radius instead circle because circle isn't supported by mongodb geo index: { "_id" : 1, "name" : "a", "circle" : [ [ 5, 5 ], 40 ], "latlng" : [ 5, 5 ], "radius" : 40 } { "_id" : 2, "name" : "b", "circle" : [ [ 10, 10 ], 5 ], "latlng" : [ 10, 10 ], "radius" : 5 } { "_id" : 3, "name" : "c", "circle" : [ [ 20, 20 ], 5 ], "latlng" : [ 20, 20 ], "radius" : 5 } { "_id" : 4, "name" : "d", "circle" : [ [ 30, 30 ], 50 ], "latlng" : [ 30, 30 ], "radius" : 50} { "_id" : 5, "name" : "e", "circle" : [ [ 80, 80 ], 30 ], "latlng" : [ 80, 80 ], "radius" : 30} { "_id" : 6, "name" : "f", "circle" : [ [ 80, 80 ], 20 ], "latlng" : [ 80, 80 ], "radius" : 20} Desired query result: { "_id" : 1, "name" : "a", "circle" : [ [ 5, 5 ], 40 ], "latlng" : [ 5, 5 ], "radius" : 40 } { "_id" : 3, "name" : "c", "circle" : [ [ 20, 20 ], 5 ], "latlng" : [ 20, 20 ], "radius" : 5 } { "_id" : 4, "name" : "d", "circle" : [ [ 30, 30 ], 50 ], "latlng" : [ 30, 30 ], "radius" : 50} { "_id" : 5, "name" : "e", "circle" : [ [ 80, 80 ], 30 ], "latlng" : [ 80, 80 ], "radius" : 30} Solution below assumes that I get all rows and then filter on the ruby side my radius but it returns only: { "_id" : 4, "name" : "d", "circle" : [ [ 30, 30 ], 50 ], "latlng" : [ 30, 30 ], "radius" : 50}

    Read the article

  • Class is not applying to submit button

    - by Mayur
    Hi All, I m Trying to apply a class to following submit button Code: <input type="submit" value="Submit" name="commit"> css : .confirm-button-submit { width : 79px; font : bold 12px sans-serif;; color : #000; background : url("../images/confirm-btn.png") 0 -33px no-repeat; text-decoration : none; margin-top :0px; text-align:center; border:0px; cursor : pointer; height:170px; } .confirm-button a { display : block; width : 79px; padding : 8px 0px 12px 0px; font : bold 12px sans-serif;; color : #000; background : url("../images/confirm-btn.png") 0 -33px no-repeat; text-decoration : none; margin-top :0px; text-align:center; } .confirm-button a:hover { display : block; width : 79px; padding : 8px 0px 12px 0px; font : bold 12px sans-serif;; color : #fff; background : url("../images/confirm-btn.png") 0 0 no-repeat; text-decoration : none; margin-top :0px; text-align:center; } But its not working proper what to do Thanks

    Read the article

  • How can I have a Label change dynamically based on a Slider Value?

    - by duney
    I'm writing a grade calculator and I currently have a slider with a textbox beside it which displays the current value of the slider: <Slider Name="gradeSlider" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Minimum="40" Maximum="100" IsSnapToTickEnabled="True" TickFrequency="5" TickPlacement="BottomRight"/> <TextBox Name="targetGrade" Grid.Row="3" Grid.Column="3" Width="30" Height="23" Text="{Binding ElementName=gradeSlider, Path=Value}" TextAlignment="Center"/> However I'm struggling to include a label which will show display a different grade classification based on the slider's value range. I'd have thought that I could create the label: <Label Name="gradeClass" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Bottom"/> And then use code: string gradeText; if (gradeSlider.Value >= 40 && gradeSlider.Value < 50) { gradeText = "Pass"; gradeClass.Content = gradeText; } else if (gradeSlider.Value >= 50 && gradeSlider.Value < 60) { gradeText = "2:2"; gradeClass.Content = gradeText; } else { gradeText = "so on..."; gradeClass.Content = gradeText; } But the label just stays as "Pass" whatever the slider value. Could somebody please advise me as to where I'm going wrong? I tried using Content = "{Binding Source = gradeText}" on the Label xaml and removing the gradeClass.Content's in the code but it complained that gradeText was declared but never used. Many thanks to anyone who can help.

    Read the article

  • Add eclipseies after some letter in Phone gap

    - by user1542984
    I want to add eclipseies after some letter in table view , I am creating table at run time .can you suggest me.In one columns i want not more than 10 char so i need eclipseies , i share my code. var tbl = document.getElementById('mainBodyDivContent'); //tbl.innerHTML = ""; for (var i = 0; i <r.length-1; i++) { var tr = document.createElement('tr'); tr.setAttribute('id', i); (function(id) { tr.onclick = function() { if(myScroll.isScrolling) {return;} //window.clearTimeout(myTimedCall); //window.clearInterval(myTimedCall); window.location.href="route.html?RID="+r[id].RID+"&StationCode="+stationCode; }; }(i)); var td1 = document.createElement('td'); td1.setAttribute('width', '10%'); td1.setAttribute("align","center"); td1.innerHTML = r[i].platformNo;; var td2 = document.createElement('td'); td2.setAttribute('width', '40%'); td2.setAttribute("align","center"); td2.innerHTML = r[i].schDepart + " - " + r[i].expDepart;; var td3 = document.createElement('td'); td3.setAttribute('width', '40%'); td3.setAttribute("align","center"); *************************i want to add eclipseies if stationName is more than 10 char is show dot.....********* td3.innerHTML = r[i].stationName + " (" + r[i].crsCode + ")" ;;

    Read the article

  • Rendering ListBox takes too long on Windows Phone

    - by Bhawk1990
    I am working on a Windows Phone 7 Application using Local SQLite Database and I'm having an issue with the rendering time of pages that use DataBinding. Currently it takes 60-70ms to retrieve the data from the database. Then it takes about 3100ms to render the data retrieved using a ListBox with DataBinding. Here you can see the DataTemplate of the ListBox: <DataTemplate x:Key="ListBoxItemTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="68" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <TextBlock x:Name="TimeColumn" Text="{Binding TimeSpan}" Grid.Column="0" Grid.Row="0" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" /> <TextBlock Text="{Binding Stop.StopName}" Grid.Column="1" Grid.Row="0" Margin="15,0,0,0" TextWrapping="NoWrap" Foreground="Black" HorizontalAlignment="Left" VerticalAlignment="Center" /> </Grid> </DataTemplate> Comment: I have tried it using Canvas instead of Grid too, same result. Then, the database loads data into a CSList (using ViciCoolStorage) and that gets Binded to the ListBox: StationList.ItemsSource = App.RouteViewModel.RouteStops; Comment: I have tried to add the elements of the CSList to an ObservableCollection and bind that to the interface but didn't seem to change anything. Question: Am I doing something wrong that results in a huge load time - even if just loading 10 elements -, or this is normal? Do you have any recommendations to get a better performance with DataBinding? Thank you for your answers in advance!

    Read the article

< Previous Page | 141 142 143 144 145 146 147 148 149 150 151 152  | Next Page >