Jump to content
  • 0

Ширина колонок в теме Zen


xSPiRiTx
 Share

Question

Есть удобный модуль Zenophile, который позволяет быстро и легко создавать суб-темы Zen и при создании указать ширину колонок. С последней версией Zen этот модуль работает плохо и тупо не может задать ширину.

В теме использую фиксированную ширину c файлом /css/layouts/fixed-width.css

/**
* @file
* Positioning for a fixed-width, desktop-centric layout.
*
* Define CSS classes to create a table-free, 3-column, 2-column, or single
* column layout depending on whether blocks are enabled in the left or right
* columns.
*
* This layout uses the Zen Grids plugin for Compass: http://zengrids.com
*/


/*
* Center the page.
*/

#page,
.region-bottom {
/* If you want to make the page a fixed width and centered in the viewport,
* this is the standards-compliant way to do that. */
margin-left: auto;
margin-right: auto;
width: 980px;
}

/*
* Apply the shared properties of grid items in a single, efficient ruleset.
*/

#header,
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
padding-left: 10px;
padding-right: 10px;
border: 0 !important;
word-wrap: break-word;
_display: inline;
_overflow: hidden;
_overflow-y: visible;
}

/*
* Containers for grid items and flow items.
*/

#header,
#main,
#footer {
*position: relative;
*zoom: 1;
}
#header:before, #header:after,
#main:before, #main:after,
#footer:before, #footer:after {
content: "";
display: table;
}
#header:after,
#main:after,
#footer:after {
clear: both;
}

/*
* Navigation bar
*/

#main {
padding-top: 3em; /* Move all the children of #main down to make room. */
position: relative;
}

#navigation {
position: absolute;
top: 0; /* Move the navbar up inside #main's padding. */
height: 3em;
width: 960px;
}

/*
* The layout when there is only one sidebar, the left one.
*/

.sidebar-first #content {
/* Span 4 columns, starting in 2nd column from left. */
float: left;
width: 764px;
margin-left: 196px;
margin-right: -980px;
}

.sidebar-first .region-sidebar-first {
/* Span 1 column, starting in 1st column from left. */
float: left;
width: 176px;
margin-left: 0px;
margin-right: -196px;
}

/*
* The layout when there is only one sidebar, the right one.
*/

.sidebar-second #content {
/* Span 4 columns, starting in 1st column from left. */
float: left;
width: 764px;
margin-left: 0px;
margin-right: -784px;
}

.sidebar-second .region-sidebar-second {
/* Span 1 column, starting in 5th column from left. */
float: left;
width: 176px;
margin-left: 784px;
margin-right: -980px;
}

/*
* The layout when there are two sidebars.
*/

.two-sidebars #content {
/* Span 3 columns, starting in 2nd column from left. */
float: left;
width: 568px;
margin-left: 196px;
margin-right: -784px;
}

.two-sidebars .region-sidebar-first {
/* Span 1 column, starting in 1st column from left. */
float: left;
width: 176px;
margin-left: 0px;
margin-right: -196px;
}

.two-sidebars .region-sidebar-second {
/* Span 1 column, starting in 5th column from left. */
float: left;
width: 176px;
margin-left: 784px;
margin-right: -980px;
}

на сайте использую основную колонку с контентом и справа колонку с меню и блоками (регион Second sidebar)

подскажите новичку пожалуйста как записать ширину колонны контента ну например 850px, а боковой регион с меню и блоками 250px

Edited by xSPiRiTx
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Для контента здесь:

.sidebar-second #content {
/* Span 4 columns, starting in 1st column from left. */
float: left;
width: 764px; <——————-
margin-left: 0px;
margin-right: -784px; <—— И здесь тоже придется править. Добавить 20px к ширине
}

Для сайдбара здесь:

.sidebar-second .region-sidebar-second {
/* Span 1 column, starting in 5th column from left. */
float: left;
width: 176px; <————————-
margin-left: 784px; <———-- Здесь также как и в контенте
margin-right: -980px;
}

Link to comment
Share on other sites

  • 0

большое спасибо. я тут и менял значение. запукался тока в отрицательных числах с добавлением 20 пикселей к ширине 0_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