Forums / Developer / Changing CSS-attributes for TopMenu

Changing CSS-attributes for TopMenu

Author Message

Newbie Girl

Wednesday 28 June 2006 4:59:24 am

I have big troubles finding the relevant CSS-attributes to change for my TopMenu. The menu becomes blue all the time, and I want to have it transparent with a picture as background. I also want the correct size.

See:
http://unifiedconsulting.ezpublish.webdeal-testspace.com/index.php/

Basically I have copied the flat_top.tpl into [my_design]\menu\ -folder. I have also copied the core.css, site.css, site-colors.css and my_stylesheet.css into my [my_design]\stylesheets - catalogue. But I can't find out to where to change the css-elements for my TopMenu. Feels like I have tried every element there is, but I hav probaly not ;)

My pagelayout.tpl at the relevant place looks like this:

<div id="topmenu">

{default current_user=fetch('user','current_user')}
{cache-block keys=array($uri_string, $current_user.role_id_list|implode( ',' ), $current_user.limited_assignment_value_list|implode( ',' ))}
<div class="break"></div>

<hr class="hide" />

{menu name=TopMenu}
<hr class="hide" />
{/cache-block}
</div>
</div>

and my flat_top.tpl file looks like this: ยจ
<div id="topmenu">
<div id="topmenu-design">

<h3 class="hide">{"Top menu"|i18n("design/base")}</h3>

{let root_node=fetch( content, node, hash( node_id, 2 ) )
menuitems=fetch( content, list, hash( parent_node_id, 2,
class_filter_type, include,
class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ),
sort_by, $root_node.sort_array ) )}
<ul>
{section var=menu loop=$menuitems}
{let selected=and( count( $module_result.path )|gt(1), eq( $module_result.path[1].node_id, $menu.node_id ) )}
{section show=eq( $menu.object.content_class.identifier, "link" )}
<li {$selected|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.data_map.location.content|ezurl}>{$menu.object.name|wash}</a></div></li>
{section-else}
{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
<li class="last {$selected|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{section-else}
<li {$selected|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{/section}
{/section}
{/let}
{/section}
</ul>
{/let}
<div class="break"></div>
</div>
</div>

<hr class="hide" />

Tim Dickinson

Wednesday 28 June 2006 5:20:48 am

The CSS file you need to look at is located here:
http://unifiedconsulting.ezpublish.webdeal-testspace.com/design/uc/stylesheets/site.css

and the relevant part to change is:

/* TOP MENU */




div#topmenu
{

/*	position: absolute; */
	width: 750px;
	height: 17px;
	text-align: left;
	vertical-align: middle;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	background-image: url('../images/menu_bg.gif');
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;

}


div.topmenu-line
{
    border-bottom: 1px solid; /* This line needs to be set to avoid bug in IE */
}

div#topmenu-design
{
/*position: absolute;*/
	width: 750px;
	height: 17px;
	margin: 0;
	padding: 0;
	text-align: left;
	vertical-align: middle;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;

}
div #topmenu a {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;
}

div #topmenu a:hover {
	color: #1c72a5;
	text-decoration: none;
}


div#topmenu ul
{
    margin: 0;
    padding: 0;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	color: #545454;
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;


}

div#topmenu li
{
    margin: 0;
    padding: 0;
    float: left;
    display: block;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	color: #545454;
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;

}

div#topmenu li div.spacing
{
    padding: 0.2em 12px 0.3em 12px;
}

div#topmenu li a
{
    text-decoration: none;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	color: #545454;
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;

}

div#topmenu li a:hover
{
    text-decoration: underline;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	font-weight: bold;
	color: #545454;
	padding-left: 12px;
	padding-right: 12px;
	text-decoration: none;


}

(It's pretty easy to find if you're using Mozilla Firefox with the Web Developer Extension).

Regards

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Newbie Girl

Wednesday 28 June 2006 11:35:27 pm

Thank you very much for answering me! Unfortunately these are the lines of code I have been trying to change for days now, and it doesn't work (even though I've cleared the cache - yes ;)

I must just scratch my head even more ;)

Thanks for answering :)

eZ debug

Timing: Jan 18 2025 21:15:06
Script start
Timing: Jan 18 2025 21:15:06
Module start 'content'
Timing: Jan 18 2025 21:15:07
Module end 'content'
Timing: Jan 18 2025 21:15:08
Script end

Main resources:

Total runtime1.3000 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0102 587.7344180.8281
Module start 'content' 0.01021.0191 768.5625559.8516
Module end 'content' 1.02930.2706 1,328.4141336.7422
Script end 1.2999  1,665.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.3820210.0002
Check MTime0.00170.1339210.0001
Mysql Total
Database connection0.00110.084910.0011
Mysqli_queries1.212293.24621940.0062
Looping result0.00250.19211920.0000
Template Total1.257696.720.6288
Template load0.00250.193020.0013
Template processing1.255096.543220.6275
Template load and register function0.00020.017010.0002
states
state_id_array0.00100.076410.0010
state_identifier_array0.00140.108420.0007
Override
Cache load0.00220.1675600.0000
Sytem overhead
Fetch class attribute can translate value0.00580.448830.0019
Fetch class attribute name0.00200.153940.0005
XML
Image XML parsing0.00100.073930.0003
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00190.1475270.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs