width

Set Video height in HTML5

守給你的承諾、 提交于 2019-12-10 01:52:15
问题 May be its a simple question but it's really driving me crazy. I just want to set the height and width of the HTML5 video. I am using this code: <video controls="controls" width="1000" id="video"> <source src="sintel-trailer.ogv" type='video/ogg; codecs="theora, vorbis"'> <source src="sintel-trailer.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> </video> Result: If I add height attribute <video controls="controls" width="1000" height="300" id="video"> <source src="sintel-trailer.ogv"

My iPhone thinks it's 980px wide

耗尽温柔 提交于 2019-12-10 00:58:33
问题 I'm trying to create a set of three very simple media query's to handle a range of screen sizes. Here's what I came up with, after a bunch of headscratching: @media all and (min-width: 0px) and (max-width: 480px) { styles here } @media all and (min-width: 481px) and (max-width: 1023px) { styles here } @media all and (min-width: 1024px) { styles here } This works as I expected in browsers, but when I point my iphone at it, it insists on displaying the syles for the medium size. Playing with

Cut of text if too wide in CSS or Asp.net

谁都会走 提交于 2019-12-10 00:32:52
问题 I have this text inside a div with a fixed width: Some headline (2009-10-10 small) Some headline (2009-10-10 small) Some headline (2009-10-10 large) But when the headline is too wide the result is: Some headline (2009-10-10 small) Some wide headline (2009-10-10 large) Some headline (2009-10-10 large) Which is not good looking :/ What I really wants is: Some headline (2009-10-10 small) Some wide... (2009-10-10 large) Some headline (2009-10-10 large) Is this possible to make with Asp.net and

Canon EDSDK How can I get width and height of live view images?

夙愿已清 提交于 2019-12-10 00:21:27
问题 I written C++ code to display live view image on monitor. I referred to some code on stackoverflow. Finally, I complete my code, but there are some problem. I want display live view image using opencv, but I don't know to get the width & height of live view image. (maybe it is retrieved by EDSDK function..) please answer for me. (I attached my code, I want suitable answer for my code) (look at "//libjpegTurbo...//, there are manual _width & height. I want to retrieve using function) //

XAML, binding Width and Height properties to the same properties of other control

时间秒杀一切 提交于 2019-12-09 16:55:33
问题 I'm trying to create a reflection effect and it's working great except that I have to hard-code some values. This is my XAML: <Grid> <Grid.RowDefinitions> <RowDefinition Height="60"/> <RowDefinition /> <RowDefinition Height="80"/> </Grid.RowDefinitions> <StackPanel Grid.Row="1" VerticalAlignment="Center"> <UserControl x:Name="CurrentPresenter" /> <Border Width="500" Height="200" > <Border.Background> <VisualBrush Visual="{Binding ElementName=CurrentPresenter}" > <VisualBrush.Transform>

How do I force nested list items to be the same width as parent list item?

ⅰ亾dé卋堺 提交于 2019-12-09 16:13:53
问题 I have a horizontal parent list. Some of the list items display a nested vertical list when clicked. How do I force the items in the vertical sub list to be the same width as the parent list item? See jsFiddle. HTML: <ul class="mainMenu horizontalMenu bulletless fullWidth bold"> <li class="showSubMenu"> <div>Resumes & Cover Letters ▾ </div> <ul class="mainSubMenu bulletless"> <li><a>Resumes</a></li> <li><a>Cover Letters</a></li> <li><a>Interviews</a></li> </ul> </li><li><a>Other Link</a> </li

DOM element width can be non-integer?

强颜欢笑 提交于 2019-12-09 16:08:37
问题 I have some one page whose div elements are aligned by JavaScript. The JavaScript just check a set of div elements to find the max offsetWidth , then set all div elements' width to be the max offsetWidth . It works perfect in most browsers and locales, but it fails on french-France in Firefox on Mac. In this case, the content of div wraps. <div id="divFoo"> Heure de début : </div> for above HTML, below code report "79". javascript:alert(document.getElementById('divFoo').offsetWidth); but

HTML table column widths: combining fixed and variable widths

让人想犯罪 __ 提交于 2019-12-09 15:53:40
问题 I've made a table as such: <table style="width:1000px;"> <tr> <td>aaa</td> <td id="space"></td> <td class="fixed-width">bbb</td> <td class="fixed-width">ccc</td> </tr> </table> How would I do the CSS so that the b and c columns have a fixed width, the a column only takes as much space as needed, and the space column to expand to fill the rest of the table? 回答1: I'm no CSS guru, but it just didn't seem right that there'd be no way to do this. This appears to work in Firefox and IE7. I have not

width() and height() for modern browsers without jQuery

删除回忆录丶 提交于 2019-12-09 15:34:33
问题 I am trying to implement a simple fold/unforld effect for elastic div's, i.e. when actual dimensions of an element are not set through CSS and thus are not trivially determinable. So I need equivalents of jQuery's width() and height() for arbitrary elements; the methods should return something that would be assignable to *.style.width/height to achieve the fold/unfold effect. The methods can be setters as well, though not necessarily as it's trivial anyway (or is it not?) Compatibility: IE8+

making span tag cover entire width of div

99封情书 提交于 2019-12-09 07:53:34
问题 I have the following structure for html:- <div> <span> <a href="wherever">Wherever</a> </span> </div> If I want the span to cover the entire width of the div, how can I do that in chrome? I tried in css using span{ background:#FFF; width:100%; } It works in firefox and ie but not in chrome. 回答1: span elements are inline. Inline elements adjust their width automatically and ignore your width: expressions. Make it block-level: span { display: block; } But then it's basically just a <div> . 回答2: