Solved

Css formatting of Table inside a nested div

Posted on 2007-12-02
2
2,962 Views
Last Modified: 2009-07-29
Hi,

I am having fun and games with the formatting of a table inside nested divs.  The table contents display shopping cart items.  I have gone for a table because I need the table border grids.  Infact, I need all cells showing a border except the top, right, bottom and left outside borders.  

But back to the problem - the table just doesn't seem to fit inside the div properly unless I use display:inline;within it's css, but when I do, it throws the rest of the css formatting for the table width, borders etc off.  Yet if I leave the display:inline; out, the table width and border formatting displays ok, but it doesn't sit UNDERNEATH the h2 element above dispite being contained within a div (<div class="shop-table-item-container">) which itself has display:inline;

I have tried a number of things here and am getting lost inside my own css.  Sorry if it seems messy.  Here's an example without display:inline; inside the table css: www.thefoodfolk.com/shop-eggs.html  Added to this, there will be a number of sections containing h1, h2 and table content which all need to be wrapped inside a single <form></form>  Anyone still with me - I hope so!!!

Look forward to hearing from you,  happy to consider an incentive for someone who can help me through this (as very time critical).
Tony
skype: tony-charman
0
Comment
Question by:Treder
2 Comments
 
LVL 28

Accepted Solution

by:
TName earned 500 total points
ID: 20392337
Hi, in case I understand you correctly:
have you tried to simply float the table (for instance left), instead of setting it's display to inline?
E.g.:


.shop-table-item-container table {

/*other styles*/

float:left;

}
0
 

Author Comment

by:Treder
ID: 20394684
yup - so simple - many thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now