General Community > HTML/CSS

float properties

(1/1)

Eudemon:
see attached images, that's website's footer area (in wamp server)

on the left

--- Code: --- echo"<div style=\"float: left;\">
<script src=\"http://widgets.twimg.com/j/2/widget.js\" ></script>
</div>
<script>
twitter stuff
</script>";
--- End code ---

and the right

--- Code: --- echo'<div class="smf_copyright">
copyright stuff
</div>
--- End code ---
the smf_copyright class is

--- Code: ---#footer .smf_copyright { float: right; clear: both; text-align: right;}
--- End code ---

question
why is left overlap right

i did a test in dream weaver with the same method in some random texts, it works

--- Code: ---.test {
text-align: right;
float: right;
}
.test2 {
float: left;
}
--- End code ---

so why my footer, same theory with little complicated codes wont work

Suki:
remove the clear:both  in #footer .smf_copyright { float: right; clear: both; text-align: right;}

a clear:both must be made on a third block below the leaft and right ones, SMF has already a class for that: class="clear"

Eudemon:
tested, still doesn't work

The Craw:
Simple answer: Put the div that's floated to the right above the div that's floated left. That usually works for me.

Eudemon:
that works, thanks

Navigation

[0] Message Index

Go to full version