Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 主题化Drupal 6.x图像上载按钮_Php_Drupal_Drupal 6_Themes_Drupal Theming - Fatal编程技术网

Php 主题化Drupal 6.x图像上载按钮

Php 主题化Drupal 6.x图像上载按钮,php,drupal,drupal-6,themes,drupal-theming,Php,Drupal,Drupal 6,Themes,Drupal Theming,我正在制作一个Drupal网站的主题,到目前为止还不错。我正在Drupal 6.24平台上使用Profile pictures 6.x-1.4 我已经谈到了图像上传字段,默认情况下,该字段如下所示: 设计要求它看起来像这样: 到目前为止,我已将输入设置为: #user-register #edit-profile-picture-upload { display: block; background: transparent url(../images/button-upl

我正在制作一个Drupal网站的主题,到目前为止还不错。我正在Drupal 6.24平台上使用Profile pictures 6.x-1.4

我已经谈到了图像上传字段,默认情况下,该字段如下所示:

设计要求它看起来像这样:

到目前为止,我已将输入设置为:

 #user-register #edit-profile-picture-upload {
    display: block;
    background: transparent url(../images/button-upload.png) no-repeat scroll center center;
    width: 130px;
    height: 158px;
 }
这是文件字段的html:

<div class="form-item" id="edit-profile-picture-upload-wrapper">
  <label for="edit-profile-picture-upload">Upload: </label>
  <input type="file" name="files[profile_picture_upload]"  class="form-file" id="edit-profile-picture-upload" size="40" />
</div>    

上传:
但它看起来只是这样(在chrome和safari上,在Firefox上更糟):

您如何正确地设置此主题?或者至少“选择文件/不选择文件”按钮从哪里来?

设置输入类型=“文件”的样式并不容易,因为这种类型的输入完全依赖于浏览器

但你会在这里找到很多答案:

例如,您可以:

  • 隐藏文件输入
  • 将其替换为div(否则)
  • 单击div时触发单击文件输入

PS:这不是drupal的问题

谢谢您的回复。我有一种感觉,它不是drupal,因为没有任何东西可以触发该字段的值。无论如何,在阅读了大量这些帖子之后,我通过将输入的高度和宽度设置为与虚假基础图像相同,然后将输入的不透明度设置为0来运行它。当值更改时(用户选择一个文件),会触发一点jQuery,并更新底层图像。