Strange behaviour IE and FF [SOLVED]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Strange behaviour IE and FF [SOLVED]

Post by Gregor »

Hi there,

I created a template for a 3 column home page (www.wsv-herkingen.nl). The content on the right is displayed correct in FF, however in IE the content is placed below main. Do you have a solution for this strange behaviour? Perhaps it might be good to know that the content on the right hand side, is a UDT that is calling php-code through iframe. A part of the css:

Code: Select all

/*****************
browsers interpret margin and padding a little differently, 
we'll remove all default padding and margins and
set them later on
******************/
* {
margin:0;
padding:0;
}

/*
Set initial font styles
*/
body {
   text-align: left;
   font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
   font-size: 75.01%;
   line-height: 1em;
}

/*
set font size for all divs,
this overrides some body rules
*/
div {
   font-size: 1em;
}

/*
if img is inside "a" it would have 
borders, we don't want that
*/
img {
   border: 0;
}

/*
default link styles
*/
/* set all links to have underline and bluish color */
a,
a:link 
a:active {
   text-decoration: underline;
/* css validation will give a warning if color is set without background color. this will explicitly tell this element to inherit bg colour from parent element */
   background-color: inherit; 
   color: #18507C; 
}

a:visited {
   text-decoration: underline;
   background-color: inherit;
   color: #18507C;                /* a different color can be used for visited links */
}


/* remove underline on hover and change color */
a:hover {
   text-decoration: none;
   background-color: #C3D4DF;
   color: #ffcc00;  /* origineel #385C72;  */
}

/*****************
basic layout 
*****************/
body {
   background-color: #ccc;
   color: #333;
   margin:1em;    /* gives some air for the pagewrapper */
}

/* center wrapper, min max width */
div#pagewrapper {
   border: 1px solid black;
   margin: 0 auto;       /* this centers wrapper */
   max-width: 90em;   /* IE wont understand these, so we will use javascript magick */
   min-width: 60em;
   background-color: #fff;;
   color: black;
}

/*** header ***
we will hide text and replace it with a image
we need to assign a height for it so that the image wont cut off
*/
div#header {
   background: url(images/cms/logo_vlag.gif) #ffcc00 no-repeat center center;  /* origineel #385C72;  */
   height: 120px; 
}

div#header h1 a {
/* you can set your own image here */
   /* overflow: hidden; */
   background: url(images/cms/logo_krab.gif) no-repeat 0 center; /* 10px centreert was 0px */
   display: block;
   height: 120px;           /*  adjust according your image size */
   text-indent: -999em;  /* this hides the text */
   text-decoration:none; /* old firefox would have shown underline for the link, this explicitly hides it */
}

div#flashlogo{
/* position: absolute; */
float: right;
margin-top: -120px;

/* left: 280px;   adjust according to location in the header */
/* top: 20px;     adjust according to location in the header */
}


/* position for the search box */
div#search {
   float: right;
   width: 23em;    /* enough width for the search input box */
   text-align: right;
   padding: 0.6em 0 0.2em 0;
   margin: 0 1em;
}

div.breadcrumbs {
   padding: 1em 0 1.2em 0; /* CSS short hand rule first value is top then right, bottom and left */
   font-size: 90%;        /* its good to set fontsizes to be relative, this way viewer can change his/her fontsize */
   margin: 0 1em;        /* css shorthand rule will be opened to be "0 1em 0 1em" */
   border-bottom: 1px dotted #000;
}

div#content {
   margin: 1.5em auto 2em 0;   /* some air above and under menu and content */
   float:left;                          /* toegevoegd op 19-03-07 deze 2 regels */
   width:80%;                        /* deze waarde is van invloed op #rightcontent margin-left */
}

/* deze is voor de kolom aan de rechterzijde van het scherm */
div#rightcontent {
width: 12%;
margin: 1.5em auto 2em 0;   /* some air above and under menu and content */
margin-left:80%;                /* deze waarde is ook van invloed op #content width  */
}

div#main {
   margin-left: 26%; /* was 29% this will give room for sidebar to be on the left side, make sure this space is bigger than sidebar width */
   margin-right: 2%; /* and some air on the right */
}

div#sidebar {
   float: left;        /* set sidebar on the left side. Change to right to float it right instead. */
   width: 23%;     /* was 26% sidebar width, if you change this please also change #main margins */
   display: inline;  /* FIX IE double margin bug */
   margin-left: 0;
}

div#footer {
   clear: both;       /* keep footer below content and menu */
   color: #fff;
   background-color: #ffcc00;  /* origineel #385C72;   same bg color as in header */
}
Thanks for your help!
G
Last edited by Gregor on Mon Apr 02, 2007 6:56 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Strange behaviour IE and FF

Post by RonnyK »

Gregor,

did you try:

float: right;

for the right column, as you now have two columns, one needs to be pushed to the right.

Ronny
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: Strange behaviour IE and FF

Post by Gregor »

Ronny,

Tried that one, perhaps my css- is not set right. I don't know. In IE the text is placed in the right column and the poll is placed under the content (main) at the left side. In FF the poll is pushed a side.

Gregor
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: Strange behaviour IE and FF

Post by Gregor »

Pffff, solved. Moving around with the various width:..%;

Thanks anyway

Gregor
Post Reply

Return to “Layout and Design (CSS & HTML)”