Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
Prev Previous Post   Next Post Next
  #3  
Old 04-12-2010, 08:53 AM
martin05rc martin05rc is offline
 
Join Date: Mar 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using Firefox and the "Web developer" add-on I set out to identify the CSS areas I needed to focus on.

First I disabled all CSS just to see what the underlying HTML data looked like:
Attachment 115673

The nesting of the varioius items under "Forum" bothered me a bit at first. I think I ended-up learning that my concern was justified. Part of the issue is that we are not supposed to include display-related structure in the raw HTML data...CSS is there to put things where they belong. The <ul> from "Today's Posts" to "Quick Links" really belongs outside of the "Home" to "What's New?"

NOTE: I've butchered this up just to highlight the relevant aspects. The real code is has a lot more in it. "..." denotes something that was cut out
Code:
<div id="navbar" class="navbar">
<ul id="navtabs" class="navtabs floatcontainer">
     <li>
          <a ...>Home</a>
     </li>
     <li ...>
          <a ...>Forum</a>
               <ul ...>
                   <li>
                        <a ...>Today's Posts</a>
                   </li>
                   <li>
                        <a ...>FAQ</a>
                   </li>
                   <li>
                        <a ...>Calendar</a>
                   </li>
     
                   ...					
               </ul>
     <li>
          <a ...>Blogs</a>
     </li>
     <li>
          <a ...>What's New?</a>
     </li>
</ul>
If I didn't butcher the above too badly it might be easy to see that there is no way to reference the <ul> under the "Forum" branch of the "tree" to the fixed-width-and-centered body of the page. Well, at least I don't know if there's a way...but I did try really hard to find it! My guess is that the branch that is now under the "Forum" branch should have been an entirely separate <ul> at the same level as the "Home ~~ What's New?" <ul>. With this in place it is trivial (again, for me --a non-expert) to make both of these areas follow the body.

Instead this is what happens. I modified "vbulletin-chrome.css" --which is where most of the action seems to happen-- as follows in order to simply create borders around areas of interest:

Code:
...
/*************************************************/
/* NAVBAR */

.navbar {
/* START ADDED */
border: 4px solid black;
/* END ADDED */

	position:relative;
...
This is what it looks like on IE7:
Attachment 115660

Now, if I change the width of the browser:
Attachment 115661

I looked at the CSS and decided to make this change:
Code:
...
/*************************************************/
/* NAVBAR */

.navbar {
/* START ADDED */
border: 4px solid black;
position: static;  /* Want to inherit from parent container */
/* END ADDED */

/*	position:relative;    COMMENTED THIS OUT */
...
This is what it looks like on IE7:
Attachment 115662
Oh, yes, check out where the search textbox landed!

This is were I started to see the repercussions of having that submenu appear where it did within the raw HTML.

As the browser window was widened this is what happened:
Attachment 115663

OK, first things first...I wanted to go after that "Home" button. This is where Firefox and Web Developer came in handy again by being able to inspect the page and find the CSS code that needed attention:

Code:
...
.navtabs li.selected a.navtab {
/* START ADDED */
border: 2px solid black;
position: static;
/* END ADDED */

	color:{vb:stylevar navbar_tab_linkhover_color};
	background:{vb:stylevar navbar_tab_selected_background};
        _background-image:none;
/*	position:relative;   COMMENTED OUT */
	top:-{vb:stylevar navbar_tab_selected_top_width}px;
	padding-top:{vb:stylevar navbar_tab_selected_top_width}px;
	z-index:10;
}
...
After these changes this is what it looked like on initial load:
Attachment 115664

And after a sizable change of the browser's window width:
Attachment 115665

This looked very promising despite little details here and there.

Now for the sub-menu. Again, using Firefox/Web Developer:
Attachment 115666

Reposition with a CSS change:
Code:
...
.navtabs ul {
/* START ADDED */
border: 2px solid black;
position: static;

/* END ADDED */

/*	background: {vb:stylevar navbar_background.backgroundColor}; */
/*	position:absolute;    COMMENTED OUT */
	top:{vb:stylevar navbar_tab_size.height}px;
	{vb:stylevar left}:0px;
	width:100%;
/*        border-top:{vb:stylevar navbar_tab_border};  COMMENTED OUT */
...
This is what it looks like now:
Attachment 115668

And this is where I show my ignorance because I really don't know how to relate the submenu area to the container for the navbar. I also don't understand why the "Home" button container (I guess) is elongating and doing so because of a child element.

I played around with this a lot more. I got the search input area and links back up to the navbar --not perfectly-- and a few other tweaks. I can't say that I got the feeling that the puzzle could be easily solved. The feeling that I did start to get was that a number of elements were located in very inconvenient places within the raw HTML code, which made it difficult, if not impossible, to repair the positioning issues with CSS --at least at my level of understanding.

I forgot to mention that the fixed-width-and-centered layout is EXACTLY the layout vbulletin.org uses! Which leads me to believe that it may have been easy to do this in 3.6.x but nearly impossible in 4.x.x ? What changed?

Any thoughts? How hard would it be to fix this?

Thanks,

-Martin
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04435 seconds
  • Memory Usage 2,610KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (11)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete