Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Wyświetlanie w jednej linii
lefi
post
Post #1





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 14.01.2008

Ostrzeżenie: (0%)
-----


Witam, mój kod wyświetla elementy jeden pod drugim a chciałbym je mieć w linii (obok siebie).

Wygląda to tak:
(IMG:http://zapodaj.net/images/889b0f823fe0.jpg)
  1. <?php
  2. $_product = $this->getProduct();
  3. $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
  4. ?>
  5. <?php if ($_product->isSaleable() && count($_attributes)):?>
  6. <dl>
  7. <?php foreach($_attributes as $_attribute): ?>
  8. <dt><label><?php echo $_attribute->getLabel() ?><span class="required">&nbsp;*</span></label></dt>
  9. <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
  10. <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
  11. <option><?php echo $this->__('Choose an Option...') ?></option>
  12. </select>
  13. </dd>
  14. <?php endforeach; ?>
  15. </dl>
  16. <script type="text/javascript">
  17. var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
  18. </script>
  19. <?php endif;?>
Go to the top of the page
+Quote Post
Andaramuxo
post
Post #2





Grupa: Zarejestrowani
Postów: 150
Pomógł: 15
Dołączył: 18.03.2009

Ostrzeżenie: (10%)
X----


Co to ma wspólnego z php? Możesz w span zrobić position i odpowiednio sobie ustawić.
Go to the top of the page
+Quote Post
lefi
post
Post #3





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 14.01.2008

Ostrzeżenie: (0%)
-----


Jak możesz to podpowiedz jak
Go to the top of the page
+Quote Post
maly_swd
post
Post #4





Grupa: Zarejestrowani
Postów: 744
Pomógł: 118
Dołączył: 14.02.2009
Skąd: poziome

Ostrzeżenie: (0%)
-----


do <select ....> daj style="float: left;"> albo display: inline;
Go to the top of the page
+Quote Post
seth-kk
post
Post #5





Grupa: Zarejestrowani
Postów: 444
Pomógł: 79
Dołączył: 26.05.2009

Ostrzeżenie: (0%)
-----


przy takim ukladzie tagow najlepiej cos w stylu
  1. * {margin: 0; padding: 0}
  2. dt {float: left}
  3. dd {clear: left}
Go to the top of the page
+Quote Post
lefi
post
Post #6





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 14.01.2008

Ostrzeżenie: (0%)
-----


seth-kk jak i gdzie to zastosować bo powyższe porady nie pomogły
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.09.2025 - 09:40