Jump to content
  • 0

Второй ряд элементов


Ledok
 Share

Question

привет, пишу сайт на битриксе, встала необходимость сделать табы. нашла вариант, внедрила на сайт, теперь возник вопрос, реально ли сделать второй ряд с кнопками-названиями (под первым)? особенность в том, что происходит действие при наведении мышки на название с кнопкой.

6661155659.jpg

/*меню статей*/
.menu2 {
width:500px;
height: 550px;
position:relative;
text-indent: 0px;
overflow: hidden;}

.menu2 li {display: inline-block; height: 550px;}

.menu2 li > span {
display: inline-block;
background: #fff;
padding: 0 5px;
border: 1px solid #e1e1e1;
line-height: 24px; height: 550px;}



.menu2 li > span:hover,
.menu2 li:hover > span,
.menu2 li:first-child > span { border-bottom: 1px solid #fff; position: relative; }

.menu2 li > span:hover:before,
.menu2 li:hover > span:before {
content: "";
width: 500px; /* ширины должно хватить, чтобы перекрыть border-bottom первого пункта */
position: absolute; bottom: -1px; left: -500px;
border-bottom: 1px solid #e1e1e1;
}

.menu2 li > div {display:none; height: 550px;}

.menu2 li:first-child > div,
.menu2 li:hover > div {
display:block;
position:absolute; left:0; top:26px; /* 24 line-height + 2 border (верхняя и нижняя граница) у span */
height: 550px;; /* 250 у ul - 26 у div */
width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
padding: 5px;
background: #fff;
border-top: 1px solid #e1e1e1;
border-top: 1px solid #fff;
overflow: auto;
}

<ul class="menu2">
<li><span><b>Статьи</b></span><div class="ttt"><table><tr><td><?$APPLICATION->IncludeComponent("bitrix:catalog.section.list", "template3", array(
"IBLOCK_TYPE" => "news",
"IBLOCK_ID" => "19",
"SECTION_ID" => $_REQUEST["SECTION_ID"],
"SECTION_CODE" => "",
"COUNT_ELEMENTS" => "Y",
"TOP_DEPTH" => "2",
"SECTION_FIELDS" => array(
0 => "",
1 => "",
),
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"SECTION_URL" => "",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_GROUPS" => "N",
"ADD_SECTIONS_CHAIN" => "N"
),
false
);?> </div></tr></td></table>
<br/><div style="padding: 0px 20px 0px 20px;">
<?$APPLICATION->IncludeComponent("bitrix:news", "Popul_stat", array(
"IBLOCK_TYPE" => "Popular_stat",
"IBLOCK_ID" => "20",
"NEWS_COUNT" => "4",
"USE_SEARCH" => "N",
"USE_RSS" => "N",
"USE_RATING" => "N",
"USE_CATEGORIES" => "N",
"USE_REVIEW" => "Y",
"MESSAGES_PER_PAGE" => "10",
"USE_CAPTCHA" => "Y",
"REVIEW_AJAX_POST" => "Y",
"PATH_TO_SMILE" => "/bitrix/images/forum/smile/",
"FORUM_ID" => "3",
"URL_TEMPLATES_READ" => "",
"SHOW_LINK_TO_FORUM" => "Y",
"POST_FIRST_MESSAGE" => "N",
"USE_FILTER" => "N",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_ORDER1" => "DESC",
"SORT_BY2" => "SORT",
"SORT_ORDER2" => "ASC",
"CHECK_DATES" => "Y",
"SEF_MODE" => "Y",
"SEF_FOLDER" => "/",
"AJAX_MODE" => "Y",
"AJAX_OPTION_JUMP" => "Y",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "N",
"SET_TITLE" => "N",
"SET_STATUS_404" => "N",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"ADD_SECTIONS_CHAIN" => "N",
"USE_PERMISSIONS" => "N",
"PREVIEW_TRUNCATE_LEN" => "100",
"LIST_ACTIVE_DATE_FORMAT" => "d.m.Y",
"LIST_FIELD_CODE" => array(
0 => "",
1 => "",
),
"LIST_PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"DISPLAY_NAME" => "N",
"META_KEYWORDS" => "-",
"META_DESCRIPTION" => "-",
"BROWSER_TITLE" => "NAME",
"DETAIL_ACTIVE_DATE_FORMAT" => "d.m.Y",
"DETAIL_FIELD_CODE" => array(
0 => "CODE",
1 => "",
),
"DETAIL_PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"DETAIL_DISPLAY_TOP_PAGER" => "N",
"DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
"DETAIL_PAGER_TITLE" => "Страница",
"DETAIL_PAGER_TEMPLATE" => "",
"DETAIL_PAGER_SHOW_ALL" => "N",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Новости",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"DISPLAY_DATE" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"USE_SHARE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"SEF_URL_TEMPLATES" => array(
"news" => "",
"section" => "",
"detail" => "popul_detail.php?ELEMENT_ID=#ELEMENT_ID#",
),
"VARIABLE_ALIASES" => array(
"detail" => array(
"ELEMENT_ID" => "ELEMENT_ID",
),
)
),
false
);?></div> </td></tr></table> </div></li>
<li><span>От первого лица</span><div><table><tr><td><?$APPLICATION->IncludeComponent("bitrix:catalog.section", ".default", array(
"IBLOCK_TYPE" => "news",
"IBLOCK_ID" => "19",
"SECTION_ID" => "148",
"SECTION_CODE" => "",
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"ELEMENT_SORT_FIELD" => "sort",
"ELEMENT_SORT_ORDER" => "asc",
"FILTER_NAME" => "arrFilter",
"INCLUDE_SUBSECTIONS" => "Y",
"SHOW_ALL_WO_SECTION" => "N",
"PAGE_ELEMENT_COUNT" => "6",
"LINE_ELEMENT_COUNT" => "3",
"PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"OFFERS_LIMIT" => "5",
"SECTION_URL" => "",
"DETAIL_URL" => "",
"BASKET_URL" => "/personal/basket.php",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"PRODUCT_PROPS_VARIABLE" => "prop",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_GROUPS" => "N",
"META_KEYWORDS" => "-",
"META_DESCRIPTION" => "-",
"BROWSER_TITLE" => "-",
"ADD_SECTIONS_CHAIN" => "N",
"DISPLAY_COMPARE" => "N",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "N",
"CACHE_FILTER" => "N",
"PRICE_CODE" => array(
),
"USE_PRICE_COUNT" => "N",
"SHOW_PRICE_COUNT" => "1",
"PRICE_VAT_INCLUDE" => "Y",
"PRODUCT_PROPERTIES" => array(
),
"USE_PRODUCT_QUANTITY" => "N",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Товары",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "Y",
"AJAX_OPTION_ADDITIONAL" => ""
),
false
);?> </td></tr></table></div></li>
<li><span>Ключевые решения</span><div><table><tr><td><?$APPLICATION->IncludeComponent("bitrix:catalog.section", ".default", array(
"IBLOCK_TYPE" => "news",
"IBLOCK_ID" => "19",
"SECTION_ID" => "149",
"SECTION_CODE" => "",
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"ELEMENT_SORT_FIELD" => "sort",
"ELEMENT_SORT_ORDER" => "asc",
"FILTER_NAME" => "arrFilter",
"INCLUDE_SUBSECTIONS" => "Y",
"SHOW_ALL_WO_SECTION" => "N",
"PAGE_ELEMENT_COUNT" => "30",
"LINE_ELEMENT_COUNT" => "3",
"PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"OFFERS_LIMIT" => "5",
"SECTION_URL" => "",
"DETAIL_URL" => "",
"BASKET_URL" => "/personal/basket.php",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"PRODUCT_PROPS_VARIABLE" => "prop",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_GROUPS" => "Y",
"META_KEYWORDS" => "-",
"META_DESCRIPTION" => "-",
"BROWSER_TITLE" => "-",
"ADD_SECTIONS_CHAIN" => "N",
"DISPLAY_COMPARE" => "N",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "N",
"CACHE_FILTER" => "N",
"PRICE_CODE" => array(
),
"USE_PRICE_COUNT" => "N",
"SHOW_PRICE_COUNT" => "1",
"PRICE_VAT_INCLUDE" => "Y",
"PRODUCT_PROPERTIES" => array(
),
"USE_PRODUCT_QUANTITY" => "N",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Товары",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "Y",
"AJAX_OPTION_ADDITIONAL" => ""
),
false
);?> </td></tr></table></div></li>
<li><span>Безопасная дорога
</span><div><table><tr><td><?$APPLICATION->IncludeComponent("bitrix:catalog.section", ".default", array(
"IBLOCK_TYPE" => "news",
"IBLOCK_ID" => "19",
"SECTION_ID" => "150",
"SECTION_CODE" => "",
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"ELEMENT_SORT_FIELD" => "sort",
"ELEMENT_SORT_ORDER" => "asc",
"FILTER_NAME" => "arrFilter",
"INCLUDE_SUBSECTIONS" => "Y",
"SHOW_ALL_WO_SECTION" => "N",
"PAGE_ELEMENT_COUNT" => "30",
"LINE_ELEMENT_COUNT" => "3",
"PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"OFFERS_LIMIT" => "5",
"SECTION_URL" => "",
"DETAIL_URL" => "",
"BASKET_URL" => "/personal/basket.php",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"PRODUCT_PROPS_VARIABLE" => "prop",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_GROUPS" => "Y",
"META_KEYWORDS" => "-",
"META_DESCRIPTION" => "-",
"BROWSER_TITLE" => "-",
"ADD_SECTIONS_CHAIN" => "N",
"DISPLAY_COMPARE" => "N",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "N",
"CACHE_FILTER" => "N",
"PRICE_CODE" => array(
),
"USE_PRICE_COUNT" => "N",
"SHOW_PRICE_COUNT" => "1",
"PRICE_VAT_INCLUDE" => "Y",
"PRODUCT_PROPERTIES" => array(
),
"USE_PRODUCT_QUANTITY" => "N",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Товары",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "Y",
"AJAX_OPTION_ADDITIONAL" => ""
),
false
);?> </td></tr></table></div></li>
</ul>

Edited by Ledok
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

особенность в том, что происходит действие при наведении мышки на название с кнопкой.

какое действие? на какую кнопку, ту что ниже, или выше?

короче, если вы хотите сделать все тоже самое только чуть ниже, то не получится, контент будет сдвигать нижние табы,

а если при наведении на нижние табы просто будут выпадать пункты меню скажем, то можно, почему нет?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy