style.css: Improvements to make floating sidebar fit better on pages with inlines.
The key is using width: auto; overflow: auto; -- this allows the div(s) to the left of the floating sidebar to be resized to fit next to it, and prevents any clear: both from pushing the div down below the end of the sidebar. Many thanks for the Hurd wiki's developers for originally figuring this out. The edit page recently developed the same problem with its textarea, now that a sidebar can appear on that page too. In editpage.tmpl I needed to add a new div around the editcontent textarea, as the above styles cannot be applied directly to textareas. The textarea's own width is reduced to 98% because at least in chromium this avoids it getting unnecessary horizonatl scrollbars when a sidebar is displayed next to it.master
parent
492c61f825
commit
23aaa5ac45
|
@ -11,6 +11,8 @@ ikiwiki (3.20100609) unstable; urgency=low
|
|||
* editpage: Avoid storing accidental state changes when previewing pages.
|
||||
* page.tmpl: Add a div around the sidebar, page content, and comments,
|
||||
to aide in styling.
|
||||
* style.css: Improvements to make floating sidebar fit better on
|
||||
pages with inlines.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 31 May 2010 20:44:17 -0400
|
||||
|
||||
|
|
|
@ -110,7 +110,12 @@ nav {
|
|||
}
|
||||
|
||||
#editcontent {
|
||||
width: 100%;
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
.editcontentdiv {
|
||||
width: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
img {
|
||||
|
@ -121,8 +126,8 @@ div.recentchanges {
|
|||
border-style: solid;
|
||||
border-width: 1px;
|
||||
overflow: auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
width: auto;
|
||||
clear: none;
|
||||
background: #eee;
|
||||
color: black !important;
|
||||
}
|
||||
|
@ -176,6 +181,7 @@ div.recentchanges {
|
|||
.inlinepage {
|
||||
padding: 10px 10px;
|
||||
border: 1px solid #aaa;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.pagedate,
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
<TMPL_VAR FIELD-TYPE>
|
||||
</TMPL_IF>
|
||||
<li>
|
||||
<div class="editcontentdiv">
|
||||
<TMPL_VAR FIELD-EDITCONTENT><br />
|
||||
</div>
|
||||
</li>
|
||||
<TMPL_IF NAME="CAN_COMMIT">
|
||||
<li>
|
||||
|
|
Loading…
Reference in New Issue