Html Osclass使内容与类别并排
我已经好几天没有尝试修改我的Osclass网站了 我目前正在使用并在单个单元格中创建了我的类别,我正在尝试将“最新项目”与我的类别并排放置,如下所示,因为Black Bender将最新项目作为默认项放在类别下 我所做的是改变我的类别和最新的项目css和添加浮动:左到他们,或位置到相对。。但没有效果 我也一直在关注奥斯卡论坛。。找到这个问题 根据给出的解决方案,我在第92行的Header.php中添加了一些代码Html Osclass使内容与类别并排,html,css,osclass,Html,Css,Osclass,我已经好几天没有尝试修改我的Osclass网站了 我目前正在使用并在单个单元格中创建了我的类别,我正在尝试将“最新项目”与我的类别并排放置,如下所示,因为Black Bender将最新项目作为默认项放在类别下 我所做的是改变我的类别和最新的项目css和添加浮动:左到他们,或位置到相对。。但没有效果 我也一直在关注奥斯卡论坛。。找到这个问题 根据给出的解决方案,我在第92行的Header.php中添加了一些代码 <div class="clear"></div> <
<div class="clear"></div>
<div class="latest_ads">
<h1><strong><?php _e('Latest Listings', 'bender_black') ; ?></strong></h1>
<?php if( osc_count_latest_items() == 0) { ?>
<div class="clear"></div>
<p class="empty"><?php _e("No Listing", 'bender_black'); ?></p>
<?php } else { ?>
<div class="actions">
<span class="doublebutton <?php echo $buttonClass; ?>">
<a href="<?php echo osc_base_url(true); ?>?sShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('List', 'bender_black'); ?></span></a>
<a href="<?php echo osc_base_url(true); ?>?sShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('Grid', 'bender_black'); ?></span></a>
</span>
</div>
<?php
View::newInstance()->_exportVariableToView("listType", 'latestItems');
View::newInstance()->_exportVariableToView("listClass",$listClass);
osc_current_web_theme_path('loop.php');
?>
<div class="clear"></div>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>">
<strong><?php _e('See all listings', 'bender_black') ; ?> »</strong></a>
</p>
<?php } ?>
<?php } ?>
</div>
</div><!-- main -->
完成
我在body.home css之后创建新css-->“newcss”,如下所示
body.home #newcss {width:600px;float:right;margin:20px 0 0 0;}
<div class="newcss">
<h1><strong><?php _e('Latest Listings', 'bender_black') ; ?></strong></h1>
<?php if( osc_count_latest_items() == 0) { ?>
<div class="clear"></div>
<p class="empty"><?php _e("No Listing", 'bender_black'); ?></p>
<?php } else { ?>
<div class="actions">
<span class="doublebutton <?php echo $buttonClass; ?>">
<a href="<?php echo osc_base_url(true); ?>
?sShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list">
<span><?php _e('List', 'bender_black'); ?></span></a>
<a href="<?php echo osc_base_url(true); ?>
?sShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list">
<span><?php _e('Grid', 'bender_black'); ?></span></a>
</span>
</div>
<?php
View::newInstance()->_exportVariableToView("listType", 'latestItems');
View::newInstance()->_exportVariableToView("listClass",$listClass);
osc_current_web_theme_path('loop.php');
?>
<div class="clear"></div>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>">
<strong><?php _e('See all listings', 'bender_black') ; ?> »</strong></a>
</p>
<?php } ?>
<?php } ?>
</div>
然后我使用之前提供的相同代码,将其放在newcss div中,如下所示
body.home #newcss {width:600px;float:right;margin:20px 0 0 0;}
<div class="newcss">
<h1><strong><?php _e('Latest Listings', 'bender_black') ; ?></strong></h1>
<?php if( osc_count_latest_items() == 0) { ?>
<div class="clear"></div>
<p class="empty"><?php _e("No Listing", 'bender_black'); ?></p>
<?php } else { ?>
<div class="actions">
<span class="doublebutton <?php echo $buttonClass; ?>">
<a href="<?php echo osc_base_url(true); ?>
?sShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list">
<span><?php _e('List', 'bender_black'); ?></span></a>
<a href="<?php echo osc_base_url(true); ?>
?sShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list">
<span><?php _e('Grid', 'bender_black'); ?></span></a>
</span>
</div>
<?php
View::newInstance()->_exportVariableToView("listType", 'latestItems');
View::newInstance()->_exportVariableToView("listClass",$listClass);
osc_current_web_theme_path('loop.php');
?>
<div class="clear"></div>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>">
<strong><?php _e('See all listings', 'bender_black') ; ?> »</strong></a>
</p>
<?php } ?>
<?php } ?>
</div>