Jump to content
wendilogic

spacing issue

Recommended Posts

hello all! i have a navigation structure that needs to be exactly 380 pixels wide, and contains 3 top level menu items. The left and right items need to be flush against their respective sides of the table. The center item needs to be equally spaced between the left and right items, not necessarily in the center of the 380 pixels. I've used a table as outlined below, but the center item leans towards the left, so the spacing is not equal on both sides. Currently, each table cell holds its own css ul dropdown menu. The content of these menus is managed by a CMS, so the text can change at any given time, therefore cannot depend on any specific per-item width. Can anyone offer a different way to accomodate these requirements? i've attached an image of this meny structure. my html currently looks something like this: <html><body><table width="380px"><tr><td align="left">About Us</td><td align="center">Members Only</td><td align="right">Events & Education</td></tr></table></body></html> Thanks in advance!

post-114076-0-84455100-1356576479_thumb.png

Share this post


Link to post
Share on other sites

Judging by what you have said you could do this:

<?php?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title>HTML Template</title>    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    <script type="text/javascript" src="jquery-1.8.3.js"></script><style type="text/css">td{    border: 1px solid black;}.center{    text-align: center;}.right{    text-align: right;}</style></head><body><table width="380px"><tr><td>About Us</td><td class="center">Members Only</td><td class="right">Events & Education</td></tr></table></body></html>

Does this help? If not let me know! Regards, Lab.

Share this post


Link to post
Share on other sites

wendilogic What you are asking is not impossible, but a very messy solution would be required. The best option is how you currently have it. Since each column is different from each other, there is no good way for the middle column to know exactly how to space itself equally from the other two columns that are suppose to be flush with different ends.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...