SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Float Hell

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Float Hell

    I've recently added the overflow:hidden element to my page so huge wallpaper sized images do not ruin my layout. However this has ste off a chain reaction of layout diasters that I have not yet resolved.

    Firstly, the overflow:hidden did not work correctly in IE6, so I had to add a float:left to the < div >.

    However, when I added this attribute the images contained within the < div >, which previously floated left or right, now ignore the left/right float attributes and behave like block elements.

    I feel like roaring expletives from the rooftops, can anyone explain why this is happening?

    Main Text CSS
    Code:
    #VoteText {
    	background-color: #DDDCE2;
    	padding: 8px;
    	border-right-width: 1px;
    	border-left-width: 1px;
    	border-right-style: solid;
    	border-left-style: solid;
    	border-right-color: #353741;
    	border-left-color: #353741;
    	width: 100%;
    }
    #VoteText div {
    	width: 100%;
    	overflow: hidden;
    	float: left;
    }
    Image Float CSS - making these display inline does nothing.
    Code:
    #VoteText div img.Float_LeftPad{
    	float: left;
    	padding-right: 10px;
    	padding-bottom: 5px;
    	display: inline;
    }
    
    #VoteText div img.Float_RightPad {
    	display: inline;
    	float: right;
    	padding-left: 10px;
    	padding-bottom: 5px;
    }
    Thanks

  2. #2
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, it's probably easy to grasp what you're after because you're working with it but for somebody that hasn't seen your HTML code it could quite possibly be anything that's causing your problem.

    I don't know about other people that like to help but personally I prefer a copy of the complete HTML and a copy of complete CSS so that I can drop them both into one HTML file and just edit it from one file on my desktop.

    Alternatively you can upload it somewhere as I can then grab the relevant files I need to sort out your problem but either way I need more code to be able to see what you're doing wrong

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Same here. A complete copy (via link to the Web page) would be best.


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
  •