小编Gre*_*tra的帖子

在HTML选择下拉选项中设置下拉元素的宽度

我正在开发一个网站,涉及使用PHP脚本自动填充选择框.这一切都很好,除了问题是我用来填充文本框的内容有很长的标题(它们是期刊文章和演示文稿标题).下拉框延伸到最长元素的宽度,该元素延伸到屏幕边缘,因此无法触及滚动条.我尝试过各种尝试使用CSS手动设置下拉框到特定宽度的方法,但到目前为止无济于事.我已经完成了将选择框设置为特定宽度的最佳效果,但下拉菜单本身要宽得多.

任何有关这方面的提示将不胜感激.

编辑:

事实证明,以下CSS行适用于除谷歌浏览器之外的所有主要浏览器(我正在测试该页面).如果知道Chrome的解决方案,那将是很好的了解.

select, option { width: __; }
Run Code Online (Sandbox Code Playgroud)

html css html-select

28
推荐指数
2
解决办法
22万
查看次数

如何在SilverLight项目中使用XDocument类(C#)

我正在尝试创建一个Silverlight应用程序(第一次),它涉及从站点解析XML并显示信息.为此,我在Windows XP Service Pack 3上使用Visual Studio 2008.我还安装了.NET Framework 3.5 SP1.

我的问题是我在互联网上看到的XML解析器都没有.我的代码的顶部我有两行我认为是必要的(使用"System.xml;"和使用"System.linq;")但XDocument,XMLReader,XMLDocument和我发现的任何其他行都不起作用,返回错误无法找到类型或命名空间.我有.NET Framework.

关于这个问题我在互联网上完全没有任何改变.有没有人有任何想法?

编辑:我刚刚发现,当我在Silverlight项目的上下文之外打开文件时,它可以使用XDocument.只有当我打开整个项目时才会出现问题

以下是一些显示问题的示例代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Linq; //Error 1 (See below)

namespace LastfmAmazon
{
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();
        }

        public void DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            XDocument doc = XDocument.Parse(e.Result); //Error 2: see below

        } 

        public void Button_Click(object sender, RoutedEventArgs …
Run Code Online (Sandbox Code Playgroud)

c# xml silverlight

5
推荐指数
1
解决办法
1万
查看次数

PHP图片上传麻烦

我目前正在做一个Joomla!网站.我正在使用Jumi扩展(允许在Joomla!本身内制作和执行自定义脚本)来创建一个简单的文件上传工具.问题是我收到以下错误:

警告:复制(C:/xampp/htdocs/images/1253889508.jpg)[function.copy]:无法打开流:C:\ xampp\htdocs\Joomla\components\com_jumi\jumi.php中没有此类文件或目录(25):第61行的eval()代码

违规代码如下:

//we will give an unique name, for example the time in unix time format
$image_name=time().'.'.$extension;
//the new name will be containing the full path where will be stored (images folder)
$newname='C:/xampp/htdocs/images/'.$image_name;
//we verify if the image has been uploaded, and print error instead
$copied = copy($_FILES['image']['tmp_name'], $newname);
Run Code Online (Sandbox Code Playgroud)

完整代码可在此处获得.一旦我开始工作,我将修改它以满足我的网站的需求.

我不确定问题是否是Jumi的权限问题,或者是否存在其他问题.我能说的最好的是,无论出于何种原因,都没有创建临时文件.

感谢您提供的任何提示!

php joomla image-uploading

0
推荐指数
1
解决办法
1123
查看次数

标签 统计

c# ×1

css ×1

html ×1

html-select ×1

image-uploading ×1

joomla ×1

php ×1

silverlight ×1

xml ×1