Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ie 6/7 div seems to be clearing

ie 6/7 div seems to be clearing

Scheduled Pinned Locked Moved Web Development
csshelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nickmaroulis
    wrote on last edited by
    #1

    here is my code <div id="main_body_holder"> <div id="main_body_left"> <div class="search_pages"> Pages: <strong>1</strong> <div class="u_right"> <a href="/link">My Things</a> <strong>My Stuff</strong> </div> </div> css #u_right{ float right; } instead of getting Pages: 1 My Things My Stuff I am getting Pages: 1 My Things My Stuff If anyone knows a decent fix for this?

    P G 2 Replies Last reply
    0
    • N nickmaroulis

      here is my code <div id="main_body_holder"> <div id="main_body_left"> <div class="search_pages"> Pages: <strong>1</strong> <div class="u_right"> <a href="/link">My Things</a> <strong>My Stuff</strong> </div> </div> css #u_right{ float right; } instead of getting Pages: 1 My Things My Stuff I am getting Pages: 1 My Things My Stuff If anyone knows a decent fix for this?

      P Offline
      P Offline
      Prosanta Kundu online
      wrote on last edited by
      #2

      Try this CSS

      .u_right{ float:right; }
      .u_left {width:auto;float:left}

      And HTML

      <div id="main_body_holder">
      <div id="main_body_left">
      <div class="search_pages">
      <div class="u_left">
      Pages:
      <strong>1</strong>
      </div>

      <div class="u_right">
      <a href="/link">My Things</a>

      <strong>My Stuff</strong>
      </div>

      modified on Monday, August 16, 2010 6:03 AM

      J 1 Reply Last reply
      0
      • N nickmaroulis

        here is my code <div id="main_body_holder"> <div id="main_body_left"> <div class="search_pages"> Pages: <strong>1</strong> <div class="u_right"> <a href="/link">My Things</a> <strong>My Stuff</strong> </div> </div> css #u_right{ float right; } instead of getting Pages: 1 My Things My Stuff I am getting Pages: 1 My Things My Stuff If anyone knows a decent fix for this?

        G Offline
        G Offline
        Gerben Jongerius
        wrote on last edited by
        #3

        The allignment is defaulting to display block, meaning each DIV element is rendered on a new line. This is because of a bug in your CSS. You should have .u_right{ float: right; } The # indicator is reserved for css by element ID. The dot indicator is used for style by classname.

        N 1 Reply Last reply
        0
        • G Gerben Jongerius

          The allignment is defaulting to display block, meaning each DIV element is rendered on a new line. This is because of a bug in your CSS. You should have .u_right{ float: right; } The # indicator is reserved for css by element ID. The dot indicator is used for style by classname.

          N Offline
          N Offline
          nickmaroulis
          wrote on last edited by
          #4

          Thankyou for the help guys It seems the most difficult part of building a website is getting pages lining up on multiple browsers.

          1 Reply Last reply
          0
          • P Prosanta Kundu online

            Try this CSS

            .u_right{ float:right; }
            .u_left {width:auto;float:left}

            And HTML

            <div id="main_body_holder">
            <div id="main_body_left">
            <div class="search_pages">
            <div class="u_left">
            Pages:
            <strong>1</strong>
            </div>

            <div class="u_right">
            <a href="/link">My Things</a>

            <strong>My Stuff</strong>
            </div>

            modified on Monday, August 16, 2010 6:03 AM

            J Offline
            J Offline
            jahangir_ahmad
            wrote on last edited by
            #5

            Hi dear I am so sorry but It's wrong because the div.u_right stay at right of the parent. for this markup you need this code

            .u_right{ float:left; }
            .u_left {float:left}

            but I rather use another code for first markup (problem markup):

            .u_right
            {
            display:inline;
            }

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups