SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    float solution - last in source

    Hello

    I'm working on a webcatalog and for CEO-reasons its important to have the content first in source. on the right side I wand to have some textlinks and advertising which should be in the source after the real content. I've done it so far, but it would not float correct. Can somebody help me?


    Many thanks....

    link

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,

    You can do this and have the #contentpictsright content come after the main content in the source. You just need to move some code around.

    Take the absolute positioning off of the #content div and the #contentpicsright div. You can rely on just the floats to position these div's.
    You'll also need to give the #content a width of some sort. About 500 ish px looks like it.

    So you're left with this:
    Code:
    #content { float: left; padding-right: 40px; width: 500px; }
    
    #contentpictsright { width: 200px; height: auto; float: right; clear: right; margin-top: 45px; margin-bottom: 25px; height: auto; margin-left: 25px; border: solid 1px #fd0808; }



    Then in you html you're going to need to move the #contentpicsright div in to the #mainouter div but after the #content div, like so:

    Code:
      <div id="mainouter">
    		
    			<div id="content">
    			  <--content here-->
                            </div>	
    			<div id="contentpictsright">
    		           <--right sidebar content here-->
                             </div>				
      </div>


    Hope that of some help
    Last edited by elduderino; Sep 22, 2006 at 02:39.

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    many thanks....

    I'd try this and updated the link. Works on IE but not in FF. The other thing is, I want to have the content underneath the right box after finishing the hight of the right box.....

    Many thanks...

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry dude thats working in FF for me. Have you changed something since? If you want to content under the right box then add clear: right to the content div

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ops--- yes ist working in FF and IE - I reduced the screen and then the right box bushed down....

    But clear right dosnt work that the main content will come up under the box, probably something wrong with the width of the content or what you think.

    The Link in the first thread is updated.

    thanks again.
    cheers and a nice weekend.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •