gpt4 book ai didi

html - 使用 CSS 问题的样式

转载 作者:行者123 更新时间:2023-11-28 17:42:32 25 4
gpt4 key购买 nike

我希望我的评论输入文本框比表单中的其他字段大。我的添加表单中有以下代码:

<div class="divm centerdiv">
<?php echo $this->Form->create('Call'); ?>
<fieldset>
<legend><?php echo __('Add Call Details'); ?></legend>
<?php

echo $this->Form->input('call_date',array('required'=>false,'id'=>'datepicker','type'=>'text'));
echo $this->Form->input('call_time', array('required'=>false));
echo $this->Form->input('comments', array('required'=>false, 'id'=> 'comments'));
echo $this->Form->input('next_call_date',array('required'=>false,'id'=>'datepicker2','type'=>'text'));
echo $this->Form->input('customers_id', array('label' =>'Customer Name','options'=>$customers, 'label'=>'Customer Name', 'required'=>false));
echo $this->Form->input('employees_id', array('label' =>'Employee name','options'=>$employees, 'label'=>'Employee name', 'required'=>false));

?>
</fieldset>

<?php echo $this->Form->end(__('Submit')); ?>
</div>

我已经为评论和我的样式表添加了一个 ID,如下所示:

//some code
.divm
{
width: 50%;

}
.centerdiv
{
margin: 50px auto;

}
divm.comments{
height: 20px;
width: 20px;
}

//some code

我想将评论文本框的大小更改为比其他字段更大的大小。我试图通过在样式表中添加“divm.comments{}”部分来做到这一点,但它似乎不起作用。有人可以帮忙吗?

最佳答案

您使用了错误的(在本例中为无效的)选择器。应该只是

#comments {
height: 20px;
}

有关信息,您用于尝试选择标签名称为 divm(没有这样的东西)且类名称 = 注释的元素的语法

您可能一直在想的是选择带有 id = comments inside with class = divm 的输入,在这种情况下,它应该是 .divm #comments(注意空格),但它总是更高效选择具有 id 的元素(它们 - 或者至少应该是 - 唯一的)

关于html - 使用 CSS 问题的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23844570/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com