使用css显示全宽度的表格

时间:2015-11-16 12:21:13

标签: html css magento

检查以下网址:

http://2.kidsdial.com/customer/account/login

并使用以下凭据登录:XXXX@gmail.com&密码:XXXXXXX

检查此网址:http://2.kidsdial.com/marketplace/marketplaceaccount/myproductslist/

您可以在页面中间看到完整的表格。我想显示这个表,以便它应该覆盖整个页面 - 向左和向右延伸。

<div class = "wk_cont_ul">
<?php echo  Mage::app()->getLayout()
    ->createBlock('core/template')
    ->setTemplate('marketplace/navigation.phtml')
    ->toHtml(); ?>


    <div class = "wk_cont_ul_one">
    <?php echo  Mage::app()->getLayout()
    ->createBlock('core/template')
    ->setTemplate('mpassignproduct/navigation.phtml')
    ->toHtml(); ?>

    <?php echo  Mage::app()->getLayout()
    ->createBlock('core/template')
    ->setTemplate('mpmassuploadaddons/accountnavigationlink.phtml')
    ->toHtml(); ?>

    <?php echo  Mage::app()->getLayout()
    ->createBlock('core/template')
    ->setTemplate('mpshippingmanager/shippingleftlink.phtml')
    ->toHtml(); ?>
    </div>
    </div>
    <br/><br/>

    -->

<?php 
$isPartner= Mage::getModel('marketplace/userprofile')->isPartner(); 
$helper= Mage::helper('marketplace');
if($isPartner==1){
    ?>
    <script type="text/javascript">
    if (typeof jQuery == 'undefined'){
        document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
    }
    </script>
    <script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <div class="page-title">
        <h1 style="float:left;"><?php echo $helper->__('My Product List') ?></h1>
    </div>  
    <div class="wk_mp_design">
        <div class="block block-account">   
            <div class="block-title">   
                <strong><span><h4><?php echo $helper->__('Product List') ?></h4></span></strong>
            </div>
        </div>
        <div class="fieldset wk_mp_fieldset">
            <div class="grid">
                <div class="hor-scroll">
                    <form action="<?php echo Mage::helper('core/url')->getCurrentUrl();?>" method="post">
                        <table cellspacing="0" class="border wk_mp_list_table">
                            <thead>
                                <tr id="wk_mp_tr_heading">
                                    <th><span><?php echo $helper->__('Product Name') ?></span></th>
                                    <th><span><?php echo $helper->__('Date') ?></span></th>
                                    <th><span><?php echo $helper->__('Product Status') ?></span></th>
                                    <th><span>&nbsp;</span></th>
                                </tr>
                            </thead>
                            <tbody class="wk_mp_body">
                                <tr>
                                    <td>
                                        <input type="text" class="input-text" name="s" placeholder='<?php echo $helper->__('Search by product name') ?>' value="<?php echo $this->getRequest()->getParam('s')?>"/>
                                    </td>
                                    <td>
                                        <span class="wk_mp_td_span">
                                            <?php echo $helper->__('From: ') ?>
                                            <input name="from_date" id="special_from_date" class="input-text" value="<?php echo $this->getRequest()->getParam('from_date')?>" />
                                        </span>                             
                                        <span class="wk_mp_td_span">
                                            <?php echo $helper->__('To: ') ?>
                                            <input name="to_date" id="special_to_date" class="input-text" value="<?php echo $this->getRequest()->getParam('to_date')?>" />
                                        </span>
                                    </td>
                                    <td>
                                        <select name="prostatus" class="input-text">
                                            <option value=""><?php echo $helper->__('All') ?></option>
                                            <option value="1" <?php if($this->getRequest()->getParam('prostatus') == 1) echo 'selected="selected"'?>>
                                                <?php echo $helper->__('Approved') ?>
                                            </option>
                                            <option value="2" <?php if($this->getRequest()->getParam('prostatus') == 2) echo 'selected="selected"'?>>
                                                <?php echo $helper->__('Unapproved') ?>
                                            </option>
                                        </select>
                                    </td>
                                    <td>
                                        <button class="button" title="Save" type="submit">
                                            <span><span><span><?php echo $helper->__('Submit') ?></span></span></span>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </form>
                    <?php 
                    if(count($this->getCollection())==0){ ?>        
                        <div class="fieldset wk_mp_fieldset">
                            <div class="wk_emptymsg">
                                <?php echo $helper->__('No Product Available') ?>
                            </div>
                        </div>
                        <?php 
                    } else{ ?>
                        <form action="<?php echo $this->getUrl('marketplace/marketplaceaccount/massdeletesellerpro') ?>" method="post" id="formmassdelete" name="formmassdelete">
                            <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
                            <button class="button" title="<?php echo $helper->__('Delete Products') ?>" type="submit" style="float: left;padding: 5px 5px 5px 0;"  id="mass_delete_butn">
                                <span><span><?php echo $helper->__('Delete Products') ?></span></span>
                            </button>
                            <table cellspacing="0" class="border wk_mp_list_table wk_mp_list_container_table">
                                <thead>
                                    <tr class="wk_content">
                                        <th class="wk_check_first_td">
                                            <span>
                                                <input type="checkbox" name="mpselecctall" value="all" id="mpselecctall"/>
                                            </span>
                                        </th>
                                        <th class="wk_first_td">
                                            <span class="label name">
                                                <?php echo $helper->__('Product')?>
                                            </span>
                                        </th>
                                        <th>
                                            <span class="label">
                                                <?php echo $helper->__('sku')?>
                                            </span>
                                        </th>                                       
                                        <th>
                                            <span class="label pro_status">
                                                <?php echo $helper->__('Status')?>
                                            </span>
                                        </th>
                                        <th>
                                            <span class="label">
                                                <?php echo $helper->__('Price')?>
                                            </span>
                                        </th>                                       
                                        <!--
                                        <th>
                                            <span class="label qty">
                                                <?php echo $helper->__('Qty. Confirmed')?>
                                            </span>
                                        </th>
                                        <th>
                                            <span class="label qty">
                                                <?php echo $helper->__('Qty. Pending')?>
                                            </span>
                                        </th>   
                                        <th>
                                            <span class="label qty">
                                                <?php echo $helper->__('Qty. Sold')?>
                                            </span>
                                        </th>
                                        -->
                                        <th>
                                            <span class="label">
                                                <?php echo $helper->__('Qty')?>
                                            </span>
                                        </th>                                   

                                        <th>
                                            <span class="label">
                                                <?php echo $helper->__('Earn Amount')?>
                                            </span>
                                        </th>
                                        <th>
                                            <span class="label">
                                                <?php echo $helper->__('Action')?>
                                            </span>
                                        </th>   
                                         <th>
                                            <span class="label">
                                                <?php echo $helper->__('Update all')?>
                                            </span>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php 
                                    $i = 0;
                                    foreach($this->getCollection() as $products){
                                        $i++;
                                        $productMediaConfig = Mage::getModel('catalog/product_media_config');
                                        $salesdetail=Mage::getModel('marketplace/saleslist')->getSalesdetail($products->getEntityId());
                                        ?>
                                        <tr class="wk_row_view <?php echo $class = ($i == count($this->getCollection()))? 'wk_last_tr':''?>">
                                            <td class="wk_check_first_td">
                                                <span>
                                                    <input type="checkbox" name="product_mass_delete[]" class="mpcheckbox" value="<?php echo $products->getEntityId(); ?>"/>
                                                </span>
                                            </td>
                                            <td class="wk_first_td">
                                                <input type="hidden" class="hidden_id" value="<?php echo $products->getEntityId(); ?>" />
                                                <div class="label name" title="<?php echo $products->getName(); ?>">
                                                    <div class="wk_pro_divide1">
                                                        <img src="<?php echo Mage::helper('catalog/image')->init($products,'thumbnail');?>" class="image" />
                                                    </div>
                                                    <div class="wk_pro_divide2">
                                                        <div style="width:100%;">
                                                            <a href="<?php echo $this->getUrl($products->getUrlPath())?>" target="blank">
                                                                <?php echo $products->getName();?>
                                                            </a>
                                                        </div>

                                                    </div>
                                                </div>
                                            </td>

                                            <td>
                                            <?php echo $sku = Mage::getModel('catalog/product')->load($products->getId())->getSku();?>
                                            </td>
                                            <?php 
                                            if($products->getStatus()==2) { ?>
                                                <td>        
                                                    <span class="label pro_status">
                                                        <?php echo $helper->__('Pending')?>
                                                    </span>
                                                </td>
                                                <td>
                                                    <span class="label qty">
                                                        <?php echo $helper->__('Pending')?>
                                                    </span>
                                                </td>
                                                <td>
                                                    <span class="label qty">
                                                        <?php echo $helper->__('Pending')?>
                                                    </span> 
                                                </td>
                                                <td>
                                                    <span class="label qty">
                                                        <?php echo $helper->__('Pending')?>
                                                    </span> 
                                                </td>
                                                <td>
                                                    <span class="label qty">
                                                        <?php echo $helper->__('Pending')?>
                                                    </span> 
                                                </td>                                   
                                            <?php }
                                            else{ 
                                                $id=$products->getId();
                                                $productsolddetail=Mage::getModel('marketplace/saleslist')->getProductSalesDetailById($id);
                                                $qtycom=0;
                                                $com=0;
                                                foreach($productsolddetail as $key){
                                                    $qtycom+=$key['magequantity'];
                                                    $com+=$key['actualparterprocost'];
                                                }   ?>

                                                <td>        
                                                    <span class="label pro_status">
                                                        <?php echo $helper->__('Approved')?>
                                                    </span>
                                                </td>                                           

                                                <td>        
                                                    <span class="label pro_status">
                                                        <?php //echo $products->getPrice(); ?>

                                                        <span id="valueprice_<?php echo $products->getId(); ?>">
                                                        <?php echo $products->getPrice(); ?></span> 

                                                    <!-- comment    <?php echo Mage::helper('core')->currency($products->getPrice(), true, false);?> -->

                                                        <input type = "text" id = "price_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" "name = "price" value = "<?php echo $products->getPrice(); ?>" style = "display:none"/>


                                                        <!-- aki 2 -->
                                                        <span class="label wk_action" id="edit_link_<?php echo $products->getId(); ?>">
                                                        <img onclick="showFieldPrice('<?php echo $products->getId(); ?>'); return false;" src="<?php echo $this->getSkinUrl('marketplace/images/icon-edit.png'); ?>"/>
                                                        </span>  
                                                        <p id="updatedprice_<?php echo $products->getId(); ?>" style = "display:none;color:red;">Updated</p>
                                                        <br/>
                                                        <button id="price_update_button_<?php echo $products->getId(); ?>" class="button wk_mp_btn1" onclick="updateFieldPrice('<?php echo $products->getId(); ?>'); return false;" style="display:none" >
                                                        <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
                                                        </button>
                                                        <button id="price_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetPrice('<?php echo $products->getId(); ?>'); return false;" style="display:none" >
                                                        <span><span><?php echo $helper->__('Cancel') ?></span></span>
                                                        </button>                                                       
                                                    </span>
                                                </td>
                                                  <!--  edit qty start 2 -->
<td>


 <span id="valueqty_<?php echo $products->getId(); ?>"><?php echo (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($products)->getQty(); ?></span>
  <input type = "text" id = "qty_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" "name = "qty" value = "<?php echo (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($products)->getQty(); ?>" style = "display:none"/>






  <!-- aki 2 -->
<span class="label wk_action" id="edit_link_<?php echo $products->getId(); ?>">
        <img onclick="showField('<?php echo $products->getId(); ?>'); return false;" src="<?php echo $this->getSkinUrl('marketplace/images/icon-edit.png'); ?>"/>
    </span>  
<p id="updatedqty_<?php echo $products->getId(); ?>" style = "display:none;color:red;">Updated</p>
    <br/>
    <button id="update_button_<?php echo $products->getId(); ?>" class="button wk_mp_btn1" onclick="updateField('<?php echo $products->getId(); ?>'); return false;" style="display:none" >
        <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
    </button>

    <button id="reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideReset('<?php echo $products->getId(); ?>'); return false;" style="display:none" >
        <span><span><?php echo $helper->__('Cancel') ?></span></span>
    </button>


    <!-- aki 2 -->

    <!-- aki 1 

<span class="label wk_action" id="edit_link_<?php echo $products->getId(); ?>">
        <img onclick="updateField('<?php echo $products->getId(); ?>'); return false;" src="<?php echo $this->getSkinUrl('marketplace/images/icon-edit.png'); ?>"/>
    </span>  

    <br/>
    <button id="update_button_<?php echo $products->getId(); ?>" class="button wk_mp_btn1" title="<?php echo $helper->__('Save') ?>" type="submit" id="save_butn">
        <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
    </button>

    <button id="reset_button_<?php echo $products->getId(); ?>" type="reset" class="button wk_mp_btn1" onclick="hideReset('<?php echo $products->getId(); ?>'); return false;">
        <span><span><?php echo $helper->__('Cancel') ?></span></span>
    </button>

    aki 1 -->











                                                 <!--   edit qty end 2 -->



                                                <!--
                                                <td>
                                                    <span class="label qty">
                                                        <?php echo $salesdetail['quantitysoldconfirmed']; ?>
                                                    </span>
                                                </td>
                                                <td>
                                                    <span class="label qty">
                                                        <?php echo $salesdetail['quantitysoldpending']; ?>
                                                    </span> 
                                                </td>
                                                <td>
                                                    <span class="label qty">
                                                        <a href="<?php echo $this->getUrl('mpshippingmanager/shipping/salesdetail/')."id/".$products->getId(); ?>"><?php echo $salesdetail['quantitysold']; ?></a>
                                                    </span> 
                                                </td>
                                                -->
                                                <td>
                                                    <span class="label price">
                                                        <?php echo Mage::helper('core')->currency($salesdetail['amountearned'], true, false); ?>
                                                    </span> 
                                                </td>


                                                <?php 
                                            }?>
                                            <td>
                                                <span class="label wk_action">
                                                    <img src="<?php echo $this->getSkinUrl('marketplace/images/icon-edit.png'); ?>" data-type="<?php echo $products->getTypeId(); ?>" alt="<?php echo $helper->__('Edit')?>" title="<?php echo $helper->__('Edit')?>" class="mp_edit"/>
                                                    <img src="<?php echo $this->getSkinUrl('marketplace/images/icon-trash.png'); ?>" alt="<?php echo $helper->__('Delete')?>" title="<?php echo $helper->__('Delete')?>" class="mp_delete"/>
                                                </span> 
                                            </td>   
                                           <!-- common update button -->

                                           <td>
                                                <button id="update_button_<?php echo $products->getId(); ?>" class="button wk_mp_btn1" onclick="updateAllFields('<?php echo $products->getId(); ?>'); return false;"  >
                                    <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
                                                            </button>


                                                </td>

                                            <!-- common update button -->

                                        </tr>
                                        <?php
                                    }?>
                                </tbody>
                            </table>
                        </form>
                        <?php
                    }?>
                </div>
            </div>
            <?php echo $this->getPagerHtml(); ?>        
        </div>  
        <div class="buttons-set">
            <p class="back-link">
                <a href="javascript:;" onclick="javascript: window.history.back();" class="left">&laquo; <?php echo $helper->__('Back') ?></a>
            </p>
        </div>
    </div>

CSS

<style>

.wk_mp_btn1 {background: #3fbdf7 none repeat scroll 0 0;color: #fff;}
.social-icons {
      display:none !important; // this will work for you..
    }


</style>

<style>

.div_link-cart { display:none !important; /* remove cart button */  }
.header_search { display:none !important; }
.inner_menu    { display:none !important  }  



.header_top    { display:none !important  }
.welcome-msg   { display:none !important  }
.social-icons  {  display:none !important } 

.grid_6.pull_18.col-left.sidebar > div:last-child {
    display: none;  /* remove complete my acccount section */ 
}    
.breadcrumbs  {  display:none !important  /* remove home > My account */ } 

.block-title  {  display:none !important  /* remove markeplace text */ } 

ul.wk_cont_ul li {
    display: inline-block;

}


.wk_cont_ul  { 
background: yellow;
}


.wk_cont_ul_one 


{

    position:relative;
    left:640px;
    bottom:69px;
    display: inline-block;
    font-size:13px;
    list-style-type: none;
}


    ul.wk_cont_ul_one li

    { display: inline-block;}


</style>


<style type="text/css" media="screen"> #horizontalmenu ul { padding:1; margin:1; list-style:none; } #horizontalmenu li { float:left; position:relative; padding-right:100; display:block; border:0px solid #CC55FF; border-style:inset; } #horizontalmenu li ul { display:none; position:absolute; } #horizontalmenu li:hover ul{ display:block; background:white; height:auto; width:8em; } #horizontalmenu li ul li{ clear:both; border-style:none;} </style>


<style>

.mymenu  {

    font-size:17px;
    color : white;
}

.wk_cont_ul 
 {
    position:relative;
    bottom:50px;

}



.mymenu li { margin-right:10px; }
.mymenu li a{ text-decoration: none;padding: 5px; }
  .mymenu li a:link{ text-decoration: none; }
.mymenu li a:hover{ text-decoration: none;background:#ffff00; }



</style>

2 个答案:

答案 0 :(得分:1)

好的,要按照您的要求使用内部CSS,您可以在当前页面中尝试这些CSS规则

.fieldset {
    padding: 0 !important;
    width: 100% !important;
}

.hor-scroll{
    width: 100% !important;
}

答案 1 :(得分:0)

问题在于你的CSS: