satish_j Posted January 7, 2010 Share Posted January 7, 2010 need help relating to width of table inside a left floated div...Setting the width of table does not have any effect..The table is properly displayed in IE( inside its parent div),but for FF,it overflows out of the div..I googled and found that it is default behaviour of FF and IE that leads to this issue..I need any ideas or alternate tricks to display it properly in FF as well..any help??? Link to comment Share on other sites More sharing options...
Synook Posted January 7, 2010 Share Posted January 7, 2010 Err, link or code? Link to comment Share on other sites More sharing options...
satish_j Posted January 7, 2010 Author Share Posted January 7, 2010 Err, link or code? <div id="sidebar"><table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td></tr></table></div> css for div is: text-align: center;padding: 10px;float: left;border: 1px solid #66ccff;width: 18%; /*I need to display it on left side of page*/margin-bottom: 5px; Any inputs now?? Link to comment Share on other sites More sharing options...
needesigns Posted January 7, 2010 Share Posted January 7, 2010 Try this in body tag<div><table id="sidebar"><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td></tr></table></div>Continue with this css codetext-align: center;padding: 10px;float: left;border: 1px solid #66ccff;width: 18%; /*I need to display it on left side of page*/margin-bottom: 5px; Link to comment Share on other sites More sharing options...
satish_j Posted January 8, 2010 Author Share Posted January 8, 2010 Try this in body tag<div><table id="sidebar"><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td></tr></table></div>Continue with this css codetext-align: center;padding: 10px;float: left;border: 1px solid #66ccff;width: 18%; /*I need to display it on left side of page*/margin-bottom: 5px;u mean to say that same css code should be applied for table as well...Only change i can see is the additional id attibute for table??? Link to comment Share on other sites More sharing options...
satish_j Posted January 8, 2010 Author Share Posted January 8, 2010 added position:absolute for body elementProb solved.. Link to comment Share on other sites More sharing options...
needesigns Posted January 8, 2010 Share Posted January 8, 2010 fine, but position: absolute will be create the error sometimes. i mean if you minimize or maximize your browser window the table content doesn't maximize or minimize with depend on browser. Anyway if it's work well go head Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.