Search Results

Search found 10 results on 1 pages for 'cinaird'.

Page 1/1 | 1 

  • Cross browser (chrome/firefox) trying to get top-pos defined in percentage as pixels

    - by Cinaird
    I have a problem whit cross browser output, I'm trying to get the top and left css attribute of a div, but firefox gives me the exact pixel position and Chrome give me the percentage. Example: http://web.cinaird.se/pdf/test.htm CSS #mix{ position:absolute; top: 10px; left: 45%; background-color:#f0f; } jQuery css top: " + $("#mix").css("top") + " <br/>css left: " + $("#mix").css("left") Output Firefox (and IE8): css top: 10px css left: 267.3px Chrome: css top: 10px css left: 45% is there any way to get the same result for both (all) browsers? I would prefer to get a pixel value without any major calculation

    Read the article

  • Draggble object hides outside content when wrapt in span

    - by Cinaird
    I have a simple CSS problem In this site http://web.cinaird.se/pdf/test.htm I have a draggable images in the top content, I want a span that float on top of the image and for this I need a span containing the image and a span floating on top. So long no problem but now when i drag the image it hides outside the top content. so my question is as follows, how can I wrap a image and a floating span above and still be able to drag it outside the container. I hop I don't have missed something obvious and you have a quick solution, Thanks for your time.

    Read the article

  • EventTrigger RoutedEvent in wpf xaml

    - by Cinaird
    I have a problem in wpf xaml and i'm pretty new on this so it may be something basic i want to rotate a ellipse 360 degree <Ellipse Name="test" Fill="Black" StrokeThickness="5" Margin="0,0,0,0" Height="66"> <Ellipse.Triggers> <EventTrigger RoutedEvent="Ellipse.Loaded" SourceName="test"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName="test" Storyboard.TargetProperty="(Ellipse.RenderTransform).(RotateTransform.Angle)" From="0" To="360" Duration="0:0:0.5" RepeatBehavior="1x" /> </Storyboard> </BeginStoryboard> </EventTrigger> </Ellipse.Triggers> </Ellipse> But nothing happens, what is wrong?

    Read the article

  • can't get true height/width of object in chrome

    - by Cinaird
    I have a question, if i set a image height in css and try to get height/width i get different results in different browsers. Is there a way to get the same dimension in all browsers? You can find a live example here and the concept is like this: CSS: img{ height:100px; } Script: $(document).ready(function(){ $("#text").append($("#img_0").attr("height")); $("#text").append($("#img_0").attr("width")); }); Output Firefox: img height: 100 img width: 150 Output Chrome: img height: 100 img width: 0 Output Chrome: img height: 100 img width: 93? i have tried this from StackOverflow: stackoverflow.com/questions/1873419/jquery-get-height-width but still get the same result Any one know a good solution?

    Read the article

  • can't get height of object in chrome

    - by Cinaird
    i want to get the height property of a object: thisImage = $('#topContent img').get(index); so long no problem, but then i want to get the height like this: thisImage.height; i thought it was equvivilent to: thisImage.height(); or: thisImage.css("height"); but neither does work for me. And the greatest problem is that thisImage.height; Dose not work in chrome. Have i missed something or is this a known bug? is there another way to get the height in chrome?

    Read the article

  • FPDF in PHP, setX just indents first row

    - by Cinaird
    I use FPDF to creat PDF from PHP and i have a problem with the Write() function i use the following code and i want to indent the text block not just the first row: $pdf->SetX(60); $pdf->Write(5,'' . str_repeat( ' This is a test of setX.', 30 )); but as you can understand it's just indents the first row, any idea on how to move the whole text mas?

    Read the article

  • jquery - access json data from php

    - by Cinaird
    I have a problem accessing JSON data. I'm new to JSON an jquery so there is probably a easy solution to it and i would be glad to find out. My jQuery: $.post( "currentPage.php", { 'currentPage': 1 }, function(data){ $("body").append(data); } ); currentPage.php: $returnArray['left'] = 'test_left'; $returnArray['right'] = 'test_right'; $returnArray['numLeft'][] = 1; $returnArray['numRight'][] = 2; $returnArray['numRight'][] = 3; print json_encode($returnArray); i tried to access the data like this: data.left data['left'] but it returns blank, how is the best way to access the data?

    Read the article

  • jQuery, drop image on overlaping target

    - by Cinaird
    I am using jQuery to detect drop on target, the target in question is a image. If i drag one image upon another, and then drop it, it shall replace the target source with the dropped source. This works fine until two images lies upon each other. Some of the images lies next to each other and some times the target images overlap. if i drop, both the visible image and the image beneath is replaced with the dragged image. I hope the problem is clear and their is any good solution

    Read the article

  • Binding problem in C# wpf

    - by Cinaird
    I have a problem whit binding in wpf i have a textbox where i can do some input, then i try to bind the textinput to a custom usercontrol. This work for the usercontrol within RowDetailsTemplate but not in the CellTemplate. For each object in the CellTemplate i get this error output: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=ScaleTextBox'. BindingExpression:Path=Text; DataItem=null; target element is 'Chart' (Name=''); target property is 'MaxValue' (type 'Int32') My code looks like this: XAML <ToolBarTray ToolBarTray.IsLocked="True" DockPanel.Dock="Top" Height="25"> <ToolBar Name="ButtonBar" > <TextBox Height="23" Name="ScaleTextBox" Width="120" Text="400"/> </ToolBar> </ToolBarTray> <DataGrid ItemsSource="{Binding Path=Items}" AutoGenerateColumns="False" IsReadOnly="True" RowHeight="25" RowDetailsVisibilityMode="VisibleWhenSelected"> <DataGrid.RowDetailsTemplate> <DataTemplate> <StackPanel Orientation="Vertical" > <my:UserControl ItemsSource="{Binding Path=Samples}" MaxValue="{Binding ElementName=ScaleTextBox, Path=Text}"/>--> </StackPanel> </DataTemplate> </DataGrid.RowDetailsTemplate> <DataGrid.Columns> <DataGridTemplateColumn MinWidth="150" Header="Chart" > <DataGridTemplateColumn.CellTemplate> <DataTemplate> <my:UserControl ItemsSource="{Binding Path=Samples}" MaxValue="{Binding ElementName=ScaleTextBox, Path=Text}"/><!-- this is the problem --> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid> C# public static readonly DependencyProperty MaxValueProperty = DependencyProperty.Register("MaxValue", typeof(int), typeof(PingChart), new FrameworkPropertyMetadata(MaxValuePropertyChanged)); private static void MaxValuePropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { Console.WriteLine(e.NewValue); } What do i do wrong?

    Read the article

1