Jump to content

Three column layout - 3rd column problem


gary00ie

Recommended Posts

Hi,

 

I have a 3 column layout.  It works fine in IE8 but on every other browser it fails, it spills into the center div (screenshot attached).

 

Anybody have any idea why this might be happening?

 

CSS code:

 

 

/* All the content boxes belong to the content class. */
.content {
        position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
        width:auto;
        /*width:580px;*/
        width:680px;
        /*min-width:120px;*/
        min-width:640px;
        margin:0px 210px 20px 170px;
        /*margin: 0 210px 210px 170px;*/
        /*border:1px solid black;*/
        border:1px dashed black;
        background-color:white;
        padding:10px;
        z-index:auto;
        /* left:60px;*/
        left:80px;
; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
        }

#navAlpha {
        position:absolute;
        /*width:150px;*/
        /**width:190px;**/
        width:205px;
        top:20px;
        left:20px;
           border:1px dashed black;
        background-color:#eee;
        padding:12px;
        z-index:1;

/* IE hack */
        voice-family: "\"}\"";
        voice-family:inherit;
        /*width:128px;*/
        /**width:198px;**/
        width:215px;
        }
body>#navAlpha  {width:215px; }
#navBeta {
        position:absolute;
        /*width:190px;*/
        /**width:200px;**/
        width:225px;
        top:20px;
        right:20px;
        border:1px dashed black;
        background-color:#eee;
        padding:10px;
        z-index:1;
/* Again, the ugly brilliant hack. */
        voice-family: "\"}\"";
        voice-family:inherit;
        width:168px;
        }
/* Opera 5 hack */
body>#navBeta {width:225px;}


 

Thank you :)

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/239565-three-column-layout-3rd-column-problem/
Share on other sites

To be honest, stop using css hacks, they are not needed, and if you need to adjust for other browsers, use conditional comments.

Besides that, i recommend you design for firefox, and adjust if needed for any other browser. (also check out the sticky)

 

Furthermore the design you made can be easily done without the use of positioning absolute or relative.

I recommend to read about the properties float and clear. Ones you created something with that i am happy to help, but fixing this takes more time, and the code is already 'infected' with bad habits, so i don't see any usefulness in that. If your looking for a good on floats check out: http://css.maxdesign.com.au/floatutorial/ 

 

Hope this helps.

To be honest, stop using css hacks, they are not needed, and if you need to adjust for other browsers, use conditional comments.

Besides that, i recommend you design for firefox, and adjust if needed for any other browser. (also check out the sticky)

 

Furthermore the design you made can be easily done without the use of positioning absolute or relative.

I recommend to read about the properties float and clear. Ones you created something with that i am happy to help, but fixing this takes more time, and the code is already 'infected' with bad habits, so i don't see any usefulness in that. If your looking for a good on floats check out: http://css.maxdesign.com.au/floatutorial/ 

 

Hope this helps.

 

THanks a million for the suggestions and the link.  I looked through the tutorial and it fixed all the issues I was having. 

 

Thanks again :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.