Reply to topic  [ 6 posts ] 
Trying to create a Joomla template 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
I'm trying to create a template for Joomla and it's going well so far.

One thing I have noticed is that there are NO tables being used!

I've been trying to create a menu bar that goes across the top of the site.

I would ideally like this to spread the menu items out evenly but I can't seem to get this to work.

The only way I've been able to do it so far is set the padding on the list items but then if the text size is changed it breaks the line and continues the menu on the next line.

Is there any othwer way of doing this? What if I wanted tab images behind the menu items there must be a way of setting the width?

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Fri Feb 25, 2011 10:59 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
I think I've found a couple of ways around it.

I'll post tonight when I get home.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Fri Feb 25, 2011 12:39 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
I usually make horizontal menus by putting the contents in an unordered list and displaying the list items as inline (i.e. CSS is "display: inline;" for <li> tags).

As for tables, I've been told not to use them for content layout for the last seven years...XHTML 1.1 and CSS all the way for me!


Fri Feb 25, 2011 3:31 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
forquare1 wrote:
I usually make horizontal menus by putting the contents in an unordered list and displaying the list items as inline (i.e. CSS is "display: inline;" for <li> tags).

That's what I'm doing.

Only if I have 5 menu items and I get the layout to spread them across the page...

Code:
Home     News     More     Contact     About


Then when I add a new menu item I get this...
Code:
Home     News     More     Contact     About
Extra


But what I actually Want is this...
Code:
Home   News   More   Contact   About   Extra


If I use padding to spread them out then I will have to change the css everytime I want to add a new menu item (or take one away).

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Fri Feb 25, 2011 3:41 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
Use relative padding in the CSS

An unordered list is what you want to be using

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Fri Feb 25, 2011 4:12 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
finlay666 wrote:
Use relative padding in the CSS

An unordered list is what you want to be using

Well, I've given up for now.

I've got it looking right but if I add another menu item it wraps to the next line.

If I try any relative sizing it just doesn't spread them out at all...

Like this...
Code:
HomeNewsAboutContact                           

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Fri Feb 25, 2011 10:33 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.