Php 显示文本、文本字段和;一行中的按钮
拜访 使用CTRL+F搜索“check”,您可以看到: 我想像这样展示 我们正在使用以下代码: cssPhp 显示文本、文本字段和;一行中的按钮,php,html,css,Php,Html,Css,拜访 使用CTRL+F搜索“check”,您可以看到: 我想像这样展示 我们正在使用以下代码: css font: 12px/1.35 Arial, Helvetica, sans-serif; padding: 2px 8px !important; border: 1px solid FFFFFF; color: FFFFFF; height: 29px; line-height: 29px; border-radius: 0; }
font: 12px/1.35 Arial, Helvetica, sans-serif;
padding: 2px 8px !important;
border: 1px solid FFFFFF;
color: FFFFFF;
height: 29px;
line-height: 29px;
border-radius: 0;
}
.catalog-product-view button.button span span {
color: #fff;
float: left;
font-size: 16px;
font-weight: normal !important;
text-align: center;
Phtml
<?php if ($this->isFieldVisible('postcode')): ?>
<li class="item">
<label for="estimate_postcode"<?php if ($this->isFieldRequired('postcode')):?> class="required" <?php endif;?>><?php if ($this->isFieldRequired('postcode')):?><em>*</em><?php endif;?><?php echo Mage::helper('webdevlopers_productpageshipping')->__('') ?></label>
<div class="input-box">
<img src ="http://totaltoys.com/media/font-100.png" height= '35' width= '70'>
<input placeholder="Enter your PIN Code" class="input-text validate-postcode<?php if ($this->isFieldRequired('postcode')):?> required-entry<?php endif;?>" type="text" id="estimate_postcode" name="estimate[postcode]" value="<?php echo $this->htmlEscape($this->getFieldValue('postcode')) ?>" />
</div>
</li>
<?php endif; ?>
class=“必需”>*
将此类添加到CSS文件:
.actions {
float: left;
margin-top: 9%;
}
ul#shipping-estimation-form {
float: left;
}
按如下方式编辑HTML:
li.item{
对齐项目:居中;
显示器:flex;
}
li.img项目{
不透明度:.3;
高度:20px;
宽度:40px;
}
项目标签{
颜色:#aaa;
字体系列:“ubuntu”;
}
li.item.search{
左边距:6px;
}
li.item.search输入{
边框:1px实心#ddd;
边界半径:3px;
填充:.5rem;
}
li.item.search按钮{
背景色:#00bff;
边界:无;
边界半径:3px;
颜色:#fefefe;
填充:.5rem.5rem;
}
检查可用性
检查
您应该尝试在标签和输入框上显示:内联。现在正在发生的是,您的元素跨越了整个生产线。这是我的观点,因为我不太擅长CSS。没关系,请用代码发布答案。我把代码放错了文件。现在查看链接,比以前好多了。我已经更新了帖子。有更多的方法可以做到这一点。如果你想不兼容,也许你不想使用flexbox。你也可以用内联块来做。你能检查一下链接吗,好像我在你的代码中遗漏了什么。是的,我用了你的代码,这是我更新的html:好像我遗漏了这里。是的。您需要对HTML代码进行一些调整。您使用的是您的HTML代码,而不是我的。我使用的是相同的HTML代码,但不是只有HTML,我使用的是php组合HTML代码。