Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 11-09-2008, 01:24 PM clear property issue in firefox
javoec's Avatar
Average Talker

Posts: 23
Name: JavieR
Location: Quito, Ecuador
Trades: 0
Hi everyone. I'm JavieR, webmaster of The Futurama Point
I'm working on my first CSS tabeless design (at least the main design)

[01]
The problem is the news articles (that I wanted to change to full CSS too). At first, I created this news entry simple page:

http://slurmed.com/_des/013/UPDT_00.php

Using this code for the update part [file:UPDT_00.php]:
HTML Code:
<div class="updt">
  <div class="updt_avatar">AVATAR</div>
    <div class="updt_title">This is the title of the update<br />
This one more title line just in case... </div>
  <div class="updt_name">Name [ February 31 ,2008 ]</div>
  <div class="updt_txt">
    <img src="_des/013/m_movies.png" width="61" height="200" align="left" />Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do  eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad  minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip  ex ea commodo consequat. Duis aute irure dolor in reprehenderit in  voluptate velit esse cillum dolore eu fugiat nulla pariatur.</div>
  <div class="updt_footer">
      <div class="updt_f_left">back to top^</div>
      <div class="updt_f_right">[A] [ADDTHIS +]</div>
    </div>
</div>
and this CSS [file:updt_00.css]
Code:
@charset "utf-8";
/* CSS Document */

.updt {
    margin-bottom: 12px;
    }

/* -----------------update title--------------------- */
.updt_title {
    padding: 2px;
    font-weight: bold;
    color:#FFF;
    background-color:#272F34;
    height:40px;
    border-bottom:1px solid #FFF;
    }

/* -----------------update name--------------------- */
.updt_name {
    padding:2px;
    color:#181E23;
    background-color:#81939E;
    height:16px;
    text-align:right;
    font-size:11px;
    letter-spacing:0.15em !important;
    }

/* -----------------update txt--------------------- */
.updt_txt {
    padding:3px;
    display:block;
    }

    .updt_txt img {
        padding:2px;
        }

/* -----------------update footer--------------------- */
.updt_footer {
    padding:2px;
    color:#181E23;
    background-color:#81939E;
    height:15px;
    font-size:11px;
    }

    /* -----update left footer (back to top)----- */
    .updt_f_left {
        float:left;
        padding-left:2px;
        letter-spacing:0.15em;
        }
    .updt_f_left a {
        color:#FFF;
        text-decoration:none;
    }    
    .updt_f_left a:hover {
        color:#000;
    }

    /* -----update right footer (permalink, addthis)----- */
    .updt_f_right {
        float:right;
        padding-right:2px;
        }

/* -----------------update avatar--------------------- */
.updt_avatar {
    float:left;
    position:relative;
    height:65px;
    width:92px;
    background-color:#FF0000;
    }
I relized then that the image of the update in some cases overlaps the footer part (the bottom gray part of "back to top").. Example:


[02]
So, the only change I made to the CSS, is adding the clear:both property to the .updt_footer class:
Code:
/* -----------------update footer--------------------- */
.updt_footer {
    padding:2px;
    color:#181E23;
    background-color:#81939E;
    height:15px;
    font-size:11px;
    clear:both;
    }
...and this was the result:
[file:UPDT_01.php] + [file:updt_01.css]:
http://slurmed.com/_des/013/UPDT_01.php


[03]
Now the image is not overlapping the footer section like I wanted.. but, if I add this code to the main design (that also has the updt_01.css CSS file):
http://slurmed.com/index13_09.php?p=...3/UPDT_01_MAIN
[where UPDT_01_MAIN.php = UPDT_01.php]

Only the 1st news item has a big space empty between the text and the footer (looking at it with Firefox or Opera, that render CSS properly). Example:

This also happens if you visit the news13 page (that is the one that handles the real news items):
http://slurmed.com/index13_09.php?p=news13

Now, I don't know how to fix this.. the problem only appears when I include the update page example in the main CSS design, and only in Firefox and Opera (in IE7 looks fine, but I now that IE interprets wrong HTML and CSS). Maybe I understood the clear property wrong.

If you know how to fix this or if you know a better way to make the updates entries in CSS please let me know.

Thanks in advance!.

Last edited by javoec; 11-11-2008 at 12:01 AM.. Reason: changing to the old css files to keep the old codes relative to this post
javoec is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-10-2008, 04:01 PM Re: clear property issue
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Try adding overflow:auto to "updt" div, that will work to clear the floats. From the code you posted, I don't see where you've got any clearing at all.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-10-2008, 07:24 PM Re: clear property issue
javoec's Avatar
Average Talker

Posts: 23
Name: JavieR
Location: Quito, Ecuador
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Try adding overflow:auto to "updt" div, that will work to clear the floats. From the code you posted, I don't see where you've got any clearing at all.
Thanks for replying!
I'll try the overflow:auto when I get home.. about the clear property, I posted the code of the CSS called updt_00.css, then I added the clear:both in the CSS called updt.css where the only change is the clear:both in the .updt_footer class.. but I'll post the update of the CSS [updt.css] in the 1st post just in case.

Last edited by javoec; 11-10-2008 at 07:25 PM..
javoec is offline
Reply With Quote
View Public Profile
 
Old 11-10-2008, 11:54 PM Re: clear property issue
javoec's Avatar
Average Talker

Posts: 23
Name: JavieR
Location: Quito, Ecuador
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Try adding overflow:auto to "updt" div, that will work to clear the floats
Thanks a lot for the input LadynRed!

I added the overflow:auto to the .updt class CSS, and I also kept the clear:both in the .updt_footer class.

[file:updt.css]
Code:
@charset "utf-8";
/* CSS Document */

.updt {
    margin-bottom: 12px;
    overflow:auto;
    }

/* -----------------update title--------------------- */
.updt_title {
    padding: 2px;
    font-weight: bold;
    color:#FFF;
    background-color:#272F34;
    height:40px;
    border-bottom:1px solid #FFF;
    vertical-align:middle;
    }

/* -----------------update name--------------------- */
.updt_name {
    padding:2px;
    color:#181E23;
    background-color:#81939E;
    height:16px;
    text-align:right;
    font-size:11px;
    letter-spacing:0.15em !important;
    }

/* -----------------update txt--------------------- */
.updt_txt {
    padding:3px;
    display:block;
    }

    .updt_txt img {
        padding:2px;
        }

/* -----------------update footer--------------------- */
.updt_footer {
    padding:2px;
    color:#181E23;
    background-color:#81939E;
    height:15px;
    font-size:11px;
    clear:both;
    }

    /* -----update left footer (back to top)----- */
    .updt_f_left {
        float:left;
        padding-left:2px;
        letter-spacing:0.15em !important;
        }
    .updt_f_left a {
        color:#FFF;
        text-decoration:none;
    }    
    .updt_f_left a:hover {
        color:#000;
    }
    
    /* -----update right footer (permalink, addthis)----- */
    .updt_f_right {
        float:right;
        padding-right:2px;
        }

/* -----------------update avatar--------------------- */
.updt_avatar {
    float:left;
    position:relative;
    height:65px;
    width:92px;
    background-color:#FF0000;
    }
The problem was fixed in Firefox and Opera, but then the scroll appeared in each .updt <div> on IE7, so, then I changed the overflow:auto to the overflow:hidden and is looking great now, but I don't know if this change will affect the rendering on IE6.
Code:
.updt {
    margin-bottom: 12px;
    overflow:hidden;
     }
FINAL RESULT:
http://slurmed.com/index13_10.php?p=news13

If anyone can check the page in IE6 or any other old or different browser and tell me if is looking correctly, it would be great!.

I've another issue that I don't know how to handle. Almost all the pages that load inside this new tableless design use old HTML and tables (that I have no chance to change for the moment because it can take many time). I have problems to show images that overlap the main design (on FF3 and Opera9) and that go under the left menu in IE7, like these examples, looking them with the FIXED CSS mode (the link is on the top left corner of the content in white):

http://slurmed.com/index13_10.php?p=...=javier&pag=13
FF3 + Opera9


IE7


other example:
http://slurmed.com/index13_10.php?p=...o-planet-fishy


What I want is that the main design can expand like it happens when I include those pages in side a <td> of a table, example (if you look the page in a small 1024x768 resolution):
http://slurmed.com/?p=comics/@view&n...o-planet-fishy

I know that what I'm doing is not the best (mixing new and really old HTML stuff lol), but meanwhile, I want to fix this minor errors, and in the future, change also those pages to CSS only.

Once again, thanks in advance.

Last edited by javoec; 11-11-2008 at 12:01 AM..
javoec is offline
Reply With Quote
View Public Profile
 
Old 11-11-2008, 02:45 PM Re: clear property issue
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You do have some problems in IE6, unfortunately.

As long as you have things stuck in tables, those tables are going to expand to fit the content you put into them.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-11-2008, 11:29 PM Re: clear property issue
javoec's Avatar
Average Talker

Posts: 23
Name: JavieR
Location: Quito, Ecuador
Trades: 0
Quote:
Originally Posted by LadynRed View Post
You do have some problems in IE6, unfortunately.
I have now a standalone version of IE6.. I'll try to fix those errors... thanks!

Quote:
Originally Posted by LadynRed View Post
As long as you have things stuck in tables, those tables are going to expand to fit the content you put into them.
I know, but the .content <div> of the main design (the white part of it) is not a <table> or a <td>.. so the tables inside the .content <div> doesn't make it expand (please let me know if I misunderstood your comment, or if you understand me now)

Once again, thanks!
javoec is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to clear property issue
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53206 seconds with 12 queries