Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About get_navigation
#1
A small thing.

get_navigation returns menu items as a series of <li>s each on a new line. Would it be better just to get the <li>s all on one line?

The line ending in html can add some unexpected and unwanted spacing to some layouts.
Reply
#2
Like what ? newlines should have no effect on layout unless your html is non compliant or doc type is wrong.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
are you trying to use inline lists ?
use float: left instead with inline-block elements.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
use display:inline
Reply
#5
(2014-07-06, 00:26:31)Timbow Wrote: The line ending in html can add some unexpected and unwanted spacing to some layouts.

If necessary, you can strip the unwanted line endings:
PHP Code:
preg_replace('/[\r\n]/'''get_navigation()) 
Reply
#6
get_navigation does not return it echoes
you would have to wrap it in output buffering
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)