The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Web Programming > DHTML > CSS


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags:

Reply
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 07-11-2008, 04:10 AM
sarel sarel is offline
Novice
Join Date: Jun 2008
Posts: 12
iTrader: (0)
sarel is on a distinguished road
Floating Elements

Need some help if possible with my CSS.

I am using floating properties to arrange objects in my webpage.

Problem:
Placements of objects are good when viewed in I.E but in FireFox it's totally wrong.

Code:
body {
       margin: 0px; 
       font-size: 12px;
       font-family: "trebuchet ms", arial, sans-serif; }


#top  { width: 100%;
    height: 68px;
    background-color: rgb(126,146,186); 
        border-bottom: 3px ridge rgb(126,146,186) }

address { margin-top: 18px; 
          border-top: 1px solid darkorange;
          font-size: smaller; 
          padding-top: 3px;
          font-weight: bold; 
          font-style: normal }

a { color: navy; 
    font-size: 12px;
    font-weight: bold; 
    text-decoration: none }

.copylead { color: black }


h1 { font-size: 20px;
     background-color: #f90; 
     padding-left: 5px;
     letter-spacing: .2em;
     font-variant: small-caps }

h2 { 
     font-size: 18px;
     color: navy;
     font-weight: lighter; }

h3 { margin: 0px; font-size: 12px }


#main { width: 400px;
        padding: 8px;
        border: 1px dashed orange; 
        margin-top: 13px; }

#main img { float:Left;
            padding-right: 8px;}


#nav  {
        margin: 12px;
        width: 100px; 
        padding: 8px;
        border: 1px dashed orange; 
        height: 140px;
        float:left;}

#nav2 {  
        margin: 12px;    
        width: 100px;
        padding: 8px; 
        border: 1px solid black; 
        float:left;
        clear:left;}


#footer { width: 530px;
          background-color: rgb(126,146,186);
          color: white;
          border: 1px solid #000;
          padding: 8px;
          margin-left: 12px;
          margin-top: 20px;
          text-align: center; }


#footer a { color: white }


.other { 
         font-size: 10px;
         padding-left: 2px }

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #2 (permalink)  
Old 07-12-2008, 11:20 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 442
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
Can you include the HTML?

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #3 (permalink)  
Old 07-14-2008, 12:35 AM
sarel sarel is offline
Novice
Join Date: Jun 2008
Posts: 12
iTrader: (0)
sarel is on a distinguished road
Ok, hope this will help

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>
<head>
    <title>NewsParrot.com: Home</title>

<link rel="stylesheet" type="text/css" href="parrot.css">

<style type="text/css">

#note { width: 542px;
        height: 134px;
        border: 1px solid black;
    padding: 8px;
        margin-left: 10px;
        margin-top: 12px }


</style>
    
</head>

<body>

<div id="top">
<img src="newsparrot.gif" width="242" height="58" alt="Don't quote us.">
</div>


<!-- Main Nav -->

<div id="nav">

    <h3>&raquo; Main </h3>

    <a href="index.html" class="current">Home</a><br>
    <a href="world.html" title="News from around the world">World News</a><br>
    <a href="us.html" title="News from the U.S.">U.S. News</a><br>
    <a href="business.html" title="Business news">Business</a><br>
    <a href="tech.html" title="Technology news">Technology</a><br>
    <a href="sports.html" title="Sports news">Sports</a><br>
    <a href="politics.html" title="Political news">Politics</a><br>


</div>

<!-- Resource Nav Bar -->

<div id="nav2">

     <h3>&raquo; Resources </h3>
         <a href="#">Search</a><br>
         <a href="#" title="Need help? This site map can help.">Site Map</a><br>
         <a href="#" title="Launches email">Contact Us</a><br>
         <a href="#" title="Get NewsParrot content on your mobile device!">Parrot on       PDA</a><br>
         <a href="#" title="Vote in today's poll.">Today's Poll</a><br>
         <a href="#">News Archive</a><br>

</div>


<div id="main">
    <h1>Top Story...</h1>
        <h2>Nothing New</h2>
    <img src="nothing.jpg" alt="Top Story Image">
<p>Amazingly, there has been nothing that could be reasonably deemed a "top story" for several weeks. This should not be seen as indicative of any failure on our part to cover the news, locate newsworthy stories, or assign reporters promptly. Literally <em>nothing</em> worthy of "top story" status has happened, in our opinion. Unlike other popular news sources, we never resort to "fluff" just to fill the space. We believe that no news is good news, and we hope you find this non-story refreshing.
</p>

<p>Until something does happen that warrants such a headline, feel free to browse through our topical news sections, like sports, technology, and politics.
</p>

<p>Here at <b>NewsParrot</b>, we display the news as it happens, but only when and if it happens.
</p>

</div>

<div id="footer">

<a href="terms.html">Terms of Use</a> | 
<a href="privacy.html">Privacy Policy</a> | 
<a href="advertise.html">Advertise with Us</a> |
<a href="pr.html" title="View Our Most Recent Press Statement">Press</a> |
<a href="custom.html" title="Customize This Site">My Parrot</a> |
<a href="mailto:webmaster@newsparrot.com" title="Launches Email">Feedback</a> 

<address>
Contents &copy; NewsParrot.com ||
500 Canal View Blvd. Rochester, NY 14623
</address>

</div>
<div id="end">
&nbsp;
</div>

</body>
</html>

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to sarel For This Useful Post:
TeraTask (07-16-2008)
  #4 (permalink)  
Old 07-16-2008, 08:14 AM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 317
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
Please just post URL where we can see it
Reply With Quote
  #5 (permalink)  
Old 07-16-2008, 01:03 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 442
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
That's my fault ccoonen. Just did what I asked. I haven't had a chance to answer the question yet b/c I have a product update going out and have just been swamped.

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #6 (permalink)  
Old 07-16-2008, 11:49 PM
sarel sarel is offline
Novice
Join Date: Jun 2008
Posts: 12
iTrader: (0)
sarel is on a distinguished road
Sorry, there is no URL, only on my HTDOCS.

Observation:
Floating elements are left to each and every browser to interpret and variations may occur from browser to browser,
where as fixed elements using absolute or relative coordinates always produce good results.

Am I right?


__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #7 (permalink)  
Old 07-17-2008, 01:05 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 442
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
Solution

Quote:
Originally Posted by sarel View Post
Sorry, there is no URL, only on my HTDOCS.
No problem. You can also upload the file as an attachment.
Quote:
Originally Posted by sarel View Post
Observation:
Floating elements are left to each and every browser to interpret and variations may occur from browser to browser,
where as fixed elements using absolute or relative coordinates always produce good results.

Am I right?

The specification is fairly clear and while I haven't read the technicals on float in awhile, I don't remember it being left much up to the browser. You can check out the latest specification at Visual formatting model

Now, for your problem. I placed a container div around the left column and floated main. That did it for me on both browsers. The file is attached.
Attached Files
File Type: zip help.zip (1.9 KB, 0 views)

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

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



All times are GMT -7. The time now is 06:25 AM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50