Forum Moderators: not2easy

Message Too Old, No Replies

faux column

faux column, css, column, faux, image, background

         

specialk

10:23 am on Sep 28, 2008 (gmt 0)

10+ Year Member



I'm trying to make faux columns in my site. It works on ie7 and firefox but it doesnt work on ie6. What i am doing wrong?
this is me .css file

body {
font-size: 62.5%;
font-family: Arial,Helvetica,sans-serif;
}
#anaTutan {
width:800px;
margin: 0 auto;
background-color:black;
overflow:auto;
}
#icerikTutan {
width:600px;
float:left;
margin:5px;
overflow:hidden;
display:inline;
}
#sagTaraf {
width: 185px;
float:left;
margin-top:5px;
display:inline;
overflow:hidden;
}
#icerik {
margin:0;
padding:4px;
font-size: 0.8em;
line-height: 1.5em;
}
#menu {
margin:0;
padding:2px;
font-size: 0.8em;
line-height: 1.5em;
}
#kutu1 {
width:265px;
float:left;
margin-left:5px;
display:inline;
overflow:hidden;
background-color: white;
}
#kutu2 {
width:265px;
float:left;
display:inline;
margin-left:5px;
overflow:hidden;
background-color: white;
}
#kutu3 {
width:250px;
float:left;
margin-left:5px;
display:inline;
overflow:hidden;
background-color: white;
}
#kutu4 {
width:790px;
float:left;
margin:5px 0px 5px 5px;
display:inline;
overflow:hidden;
background-color: white;
}
#faux {
background: #fff url("http://localhost/css/faux.gif") repeat scroll 0 0;
overflow:auto;
margin:5px 0 5px 0;
}
.clear {
background:transparent none repeat scroll 0 0;
clear:both;
}

and this my .html file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="arayuz1.css" />
<link rel="stylesheet" type="text/css" href="reset.css" />
</head>

<body>
<div id="anaTutan">
<div id="faux">
<div id="icerikTutan"><div id="icerik">
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
mmon web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
</div></div>
<div id="sagTaraf">
<div id="menu">
Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.There are common web fonts that we use - Arial, Georgia, Verdana etc. But there are some fonts that are common to both PC and Mac and can be used - Century Gothic, Arial Narrow etc. However, different browsers and OSā&#8364;&#8482;s render type different, and you need to be aware of these differences, as your site could look dam ugly if you use the wrong font.
</div></div>
</div>
<div class="clear"></div>
<div id="kutu1"></div>
<div id="kutu2"></div>
<div id="kutu3"></div>
<div id="kutu4"></div>
</div>

</body>
</html>

thank you

specialk

1:00 am on Sep 29, 2008 (gmt 0)

10+ Year Member



and also, when i am working with css, i realized that ie 7 shows the emty divs but firefox doesnt show emty divs so i have to fill something in emty divs for firefox to show them. is there any other solution for this?

swa66

7:41 am on Sep 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A floated element collapses around its content (since divs start out at the width their parent allows, that's needed as it's the only way to have a float take some effect without having to set a width.)

Since you have no content and only set a with, on e.g. #kutu1, it should not show as it'll have no height (there's no padding and margins collapse as well)

Give it some content or give it some height.

Looking at the code:


#kutu4 {
...
float:left;
...
display:inline;
...
}

I'm left wondering what you want. Display inline means basically put it in like text. And float left means send it out of the flow and stick it left pushing away the inline content much like an <img align="left" ...> would have done. Both at the same time is kinda hard to grasp as a concept.

Tip: do not develop CSS in IE, it'll mess with your head. And IE fixes really should go in conditional comments.

specialk

10:12 am on Sep 29, 2008 (gmt 0)

10+ Year Member



i read in an article that says "All layout divs that are floated should include display:inline and overflow:hidden" to get cross browser compatibility.

specialk

10:17 am on Sep 29, 2008 (gmt 0)

10+ Year Member



and also my main problem is with my faux problem , it still doesnt work on ie6 :/