PDA

View Full Version : [HOW TO - vB4] Making Boxes fashion Sidebar (CSS)


Allan
02-08-2010, 10:00 PM
This article create a box fashion sidebar (CSS)

DEMO: http://www.vbulletin-ressources.com/forum/forum.php (for the moment of course)
In the "FORUMHOME" template, find:<vb:if condition="$show['sidebar']">
Add above:<!-- Bloc Perso Allan -->
<br />
<div id="bloc_perso">
<ul>
<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" style="position : static" id="collapse_blocperso" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="" border="0" /></a>
<img src="images/site_icons/event-alert.png" alt="" />
<span class="blocktitle">Information Area</span>
</div>
<div id="blocperso" class="blockbody floatcontainer">
<ul class="blockrow">
<li class="avatarcontent floatcontainer">
<div align="center">
<a href="http://www.test1.com">test1</a>&nbsp;&nbsp;<img src="images/misc/pucen.png" border="0" alt="" />&nbsp;&nbsp;<a href="http://www.test2.com">test2</a>
</div>
</li>
</ul>
</div>
</div>
<div class="underblock"></div>
</li>
</ul>
</div>
<!-- Bloc Perso Allan -->
In the "forumhome.css", add to the end:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
/* BLOC PERSO ALLAN */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
#bloc_perso {
float:left;
width:{vb:stylevar forum_sidebar_width};
padding:17px 0;
margin-bottom:3em;

}
#bloc_perso .block {
margin-bottom:4px;
padding:6px;
background:{vb:stylevar forum_sidebar_background};
-moz-border-radius-top{vb:stylevar left}:{vb:stylevar border_radius};
-moz-border-radius-top{vb:stylevar right}:{vb:stylevar border_radius};
-webkit-border-top-left-radius: {vb:stylevar border_radius};
-webkit-border-top-right-radius: {vb:stylevar border_radius};
}
#bloc_perso .blockbody {
color: {vb:stylevar forum_sidebar_content_color};
background:{vb:stylevar forum_sidebar_content_background.backgroundColor};
-moz-border-radius:{vb:stylevar border_radius};
-webkit-border-radius: {vb:stylevar border_radius};
padding:0;
border:{vb:stylevar forum_sidebar_content_border};
}
#bloc_perso .blockrow {
border-top:1px solid {vb:stylevar forum_sidebar_content_background.backgroundColor}; /* makes the bevel look part of the background */
-moz-border-radius:{vb:stylevar border_radius};
-webkit-border-radius: {vb:stylevar border_radius};
background:{vb:stylevar forum_sidebar_content_background};
_background-image: none;
}
#bloc_perso .underblock {
height:{vb:stylevar forum_sidebar_content_separator_height};
background:{vb:stylevar forum_sidebar_content_separator_background};
}

#bloc_perso .blockrow,
#bloc_perso .blocksubhead {
padding:10px 6px 10px 6px;
color: {vb:stylevar forum_sidebar_header_color};
}
#bloc_perso .blocksubhead {
background:transparent none;
height:{vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height} + 2px };
padding: 5px 6px;
border:none;
outline:none;
font-weight:bold;
}
#bloc_perso > ul {
background-color:{vb:stylevar forum_sidebar_background.backgroundColor};
border:{vb:stylevar forum_sidebar_border};
-moz-border-radius:{vb:stylevar border_radius};
-webkit-border-radius: {vb:stylevar border_radius};
-moz-box-shadow:-2px 2px 2px {vb:stylevar shadow_color};
float:{vb:stylevar left};
width:100%;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
/* BLOC PERSO ALLAN */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
Upload this image "pucen.png" to "../images/misc/"

Allan
02-09-2010, 02:47 PM
Public now.

Forum Lover
02-09-2010, 02:55 PM
https://vborg.vbsupport.ru/external/2010/02/54.png

How can we make it collapsible, please?

Allan
02-09-2010, 05:39 PM
https://vborg.vbsupport.ru/external/2010/02/54.png

How can we make it collapsible, please?
Collapse added :)

Forum Lover
02-09-2010, 06:50 PM
Thanks. Allan. :D

xman_79
02-10-2010, 02:28 PM
Thank you Allan , very nice .
Merci ...

betty02
02-12-2010, 12:14 PM
Really love this just don't know what to use it for haha!

darren1981
02-15-2010, 03:26 AM
Thanks for this Allan, but would it not be much easier just to use a widget ?