Forums / Setup & design / menu organization does'nt work properly

menu organization does'nt work properly

Author Message

Guilherme Longo

Tuesday 11 September 2007 2:02:42 am

My friends, by 2 days i'm trying do somenting relatively simple but without succefull.

I have one menu bar like below:

Members Log-in - Join - Site Map - About Icos

this is the code:

<div id="links">
<ul>
<b><li><a href={"/eng/about_icos"} title="about_icos">About ICOS</a></li></b>
{if $pagedesign.data_map.tag_cloud_url.data_text|ne('')}
{if $pagedesign.data_map.tag_cloud_url.content|eq('')}
<li><a href={concat("/content/view/tagcloud/", $indexpage)|ezurl} title="{$pagedesign.data_map.tag_cloud_url.data_text|wash}">{$pagedesign.data_map.tag_cloud_url.data_text|wash}</a></li>
{else}
<li><a href={$pagedesign.data_map.tag_cloud_url.content|ezurl} title="{$pagedesign.data_map.tag_cloud_url.data_text|wash}">{$pagedesign.data_map.tag_cloud_url.data_text|wash}</a></li>
{/if}
{/if}
{if $pagedesign.data_map.site_map_url.data_text|ne('')}
{if $pagedesign.data_map.site_map_url.content|eq('')}
<b><li><a href={concat("/content/view/sitemap/", $indexpage)|ezurl}</b> title="{$pagedesign.data_map.site_map_url.data_text|wash}">{$pagedesign.data_map.site_map_url.data_text|wash}</a></li>
{else}
<li><a href={$pagedesign.data_map.site_map_url.content|ezurl} title="{$pagedesign.data_map.site_map_url.data_text|wash}">{$pagedesign.data_map.site_map_url.data_text|wash}</a></li>
{/if}
{/if}
{if $basket_is_empty|not()}
<li><a href={"/shop/basket/"|ezurl} title="{$pagedesign.data_map.shopping_basket_label.data_text|wash}">{$pagedesign.data_map.shopping_basket_label.data_text|wash}</a></li>
{/if}
{if $current_user.is_logged_in}
{if $pagedesign.data_map.my_profile_label.has_content}
<li><a href={concat( "/user/edit/", $current_user.contentobject_id )|ezurl} title="{$pagedesign.data_map.my_profile_label.data_text|wash}">{$pagedesign.data_map.my_profile_label.data_text|wash}</a></li>
{/if}
{if $pagedesign.data_map.logout_label.has_content}
<li><a href={"/user/logout"|ezurl} title="{$pagedesign.data_map.logout_label.data_text|wash}">{$pagedesign.data_map.logout_label.data_text|wash} ( {$current_user.contentobject.name|wash} )</a></li>
{/if}
{else}
{if $pagedesign.data_map.register_user_label.has_content}
<b><li><a href={"/user/register"|ezurl}</b> title="{$pagedesign.data_map.register_user_label.data_text|wash}">{$pagedesign.data_map.register_user_label.data_text|wash}</a></li>
{/if}
{if $pagedesign.data_map.login_label.has_content}
<b><li><a href={"/user/login"|ezurl}</b> title="{$pagedesign.data_map.login_label.data_text|wash}">{$pagedesign.data_map.login_label.data_text|wash}</a></li>
{/if}
{/if}
{if $pagedesign.can_edit}
<li><a href={concat( "/content/edit/", $pagedesign.id, "/f/", ezini( 'RegionalSettings', 'Locale' , 'site.ini'), "/", $pagedesign.initial_language_code )|ezurl} title="{$pagedesign.data_map.site_settings_label.data_text|wash}">{$pagedesign.data_map.site_settings_label.data_text|wash}</a></li>
{/if}
</ul>
</div>

*Look the first link that a put in the Div "About Icos". I put it first but it still appears in the end of the another 3 links.

I checked my css file and it is like below:

div#links
{
float: right;
clear: right;
text-align: right;
padding-right: 30px;
font-size: 0.9em;
font-weight: bold;
height: 25px;
width: 75%;
margin: 0px;
}

div#links a
{
color: #000033;
border-left: 2px solid #999900;
display: block;
float: right;
padding-left: 0.75em;
padding-right: 0.75em;
text-decoration: underline;
height: 16px;
}

div#links a:hover {
color: #990000;

I checked every thning but i still did'nt understanding what happen.
Why ABOUT ICOS dont come to the first position im my menubar.

* Now i will try create 1 main DIV and pu another 2 divs inside and try align the links, but i thing thats is not a "best" way to do it.

Pascal Specht

Tuesday 11 September 2007 2:14:32 am

Hi Guilherme,

When it comes to such situations, I always use the Firebug extension of Firefox. Once installed, you can click on the little green icon at the bttom right, and then "Inspect" the part of the HTML you want to understand. The very nice thing is that you'll see all CSS rules that have been applied to your elements, and you can even edit them, or disable them to see the effect. I would believe that your float:right or clear:right is at the origin of your problem, but as I said, see how your menubar behaves when you disable parts of your CSS live with Firebug.

Cheers,
Pascal

Guilherme Longo

Tuesday 11 September 2007 3:09:04 am

Ok Pascal, i already instaled firebug.

I found one way but anorther problems happen
When I change my css for:

div#links
{
float: right;
clear: right;
text-align: right;
<b>padding-left: 890px;<b> (old: padding-right: 30px)
font-size: 0.9em;
font-weight: bold;
height: 25px;
width: 75%;
margin: 0px;
}

div#links a
{
color: #000033;
border-left: 2px solid #999900;
display: block;
<b>float: left;</b> (old: float: right)
padding-left: 0.75em;
padding-right: 0.75em;
text-decoration: underline;
height: 16px;
}

My menu change from:
Members Log-in - Join - Site Map - About Icos

For:
About Icos - Site Map - Join - Members Login.

Ok for while, but when the browser is minimized the page has the feature to re-align in the browser and doing thats changes, it lost this feature, the menu gone to very end left and when is browser minimized, it desapears for view screen. ;O(

But, thank for the plug-in, will be very util for me!

André R.

Tuesday 11 September 2007 3:47:56 am

Float is the reson for this, so change it or just change your template to be mirrorred of what you want.

div#links a
{
color: #000033;
border-left: 2px solid #999900;
display: block;
<b>float: right;</b>
padding-left: 0.75em;
padding-right: 0.75em;
text-decoration: underline;
height: 16px;
}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Guilherme Longo

Tuesday 11 September 2007 5:03:04 am

sorry by my inexperience, but i thing more complicated change the css structure.

I did'nt understood exactly what you mean when you say:

or just change your template to
be mirrorred of what you want.

which kind of change are you talking about?

Sorry again by my fault;

Guilherme Longo

Tuesday 11 September 2007 5:44:56 am

All right again friends. 2 hours of brainstorm was good for solve this problem ;o)

I removed the float propriety and changed the display for inline. Works perfect

div#links a
{
color: #000033;
border-left: 2px solid #999900;
<b>display: inline;</b>
padding-left: 0.75em;
padding-right: 0.20em;
text-decoration: underline;
height: 16px;
}

thanks

eZ debug

Timing: Jan 18 2025 14:57:42
Script start
Timing: Jan 18 2025 14:57:42
Module start 'content'
Timing: Jan 18 2025 14:57:43
Module end 'content'
Timing: Jan 18 2025 14:57:43
Script end

Main resources:

Total runtime0.8594 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.9453180.8281
Module start 'content' 0.00740.7378 769.7734655.9375
Module end 'content' 0.74520.1141 1,425.7109345.0703
Script end 0.8593  1,770.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4743210.0002
Check MTime0.00150.1758210.0001
Mysql Total
Database connection0.00140.158110.0014
Mysqli_queries0.761088.54742050.0037
Looping result0.00190.22442030.0000
Template Total0.831496.720.4157
Template load0.00240.283920.0012
Template processing0.828996.455320.4145
Template load and register function0.00010.013010.0001
states
state_id_array0.00070.076310.0007
state_identifier_array0.00090.102120.0004
Override
Cache load0.00230.26681510.0000
Sytem overhead
Fetch class attribute can translate value0.00090.102040.0002
Fetch class attribute name0.00120.134780.0001
XML
Image XML parsing0.00130.154840.0003
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00550.6403340.0002
String conversion0.00000.000730.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
14content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 44
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs