Hey guys i have a huge problem with two divs, The left div, where are the vertical links (example...) and the right div where are the contents of the site. http://www.mobiletore.net/index.php?module=articles http://www.mobiletore.net/index.php?module=articles&u=65&c=0&p=3228 The height of the left div is like the margin-top of the right one. Also it only happens in module=articles. In module=home there is not code and the problem is gone. Any help is welcome!
in module articles same thing is achieved with tables and in other its achieved with div and ul li's. so this is happening, you need to fix your article module and use ul li in links
Are you certain that the problem comes from the tables? I am not? Actually i am pretty sure that the problem isnt coming from them?
The left div is too wide for its space and is pushing the content div out of the way. Removing the width from the left div fixes it in Firefox but I didn't test in other browsers. div.left { float:left; [s]width:98px;[/s] margin:0; padding:1em; } Code (markup): You could also fix it by increasing the margin-left value for the content div but that causes other problems.
Tables can create massive problems, yes. A layout with 2 or 3 columns can be easily done with CSS, fixed, fluid, whatever you need. It is easier to maintain, easier to modify, easier to code! CSS is the way to go for site layout Check http://www.csszengarden.com/ ... choose another design on the right. The HTML markup is NOT changed, only the CSS is changed.
Thanks @Cash Nebula, you kinda solved my problem, and now i know why i had another problem . +rep @CSM, i am aware that tables can cause problems, but the problem in my case is not coming from the tables i have on my site. The tables wont be there forever i will remove them after i am done with the thing i do now. Thanks for the link thou, i am thinking of buying the book from this site for a long time now.
Thanks for the rep To expand the parent container so it fits the floated containers inside it, add overflow: hidden; to the parent container. Sitepoint - Simple Clearing of Floats Getting DIVS to Expand Vertically div.content { margin-left:115px; border-left:1px solid gray; padding:1em; min-height:250px; background-color:#fff; [COLOR="blue"]overflow: hidden;[/COLOR] } Code (markup):
Good job Cash. I am sick of fixing other people's CSS problems at the moment. Have to fix my own sites first (time pressure).