Floating over text

This is a discussion on "Floating over text" within the Web Page Design section. This forum, and the thread "Floating over text are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 17th, 2007, 11:50
New Member
Join Date: Feb 2007
Location: Bath
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Floating over text

I have a main container that is set as 600px in height in IE if the page content is over the 600 it resizes the container for me., However IE 7 and FF floats the text over the top.

tried using percentages with no joy.

I have tried using the overflow settings but the best I can get is it to use scroll bars, which i'm trying to avoid.

any advice would be appreciated...ta
Reply With Quote

  #2 (permalink)  
Old Dec 17th, 2007, 12:22
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 967
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: Floating over text

So I'm guessing you want it to resize?

IE6 incorrectly interprets height as min-height. However, IE6 does not understand min-height, but you can use a known CSS parsing error in IE6 in order to 'hack' your way around.

Code: Select all
#container {
min-height: 600px;  /*Set minimum height for FF, IE7 and newer browsers*/
}
* html #container {
height: 600px; /*The * html hack in front of your selector is read by IE6 but not other browsers*/
}
*Replace #container with your selector

HTH
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #3 (permalink)  
Old Dec 17th, 2007, 13:33
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Floating over text

If the above solution doesn't work, please provide a link so we can see the code you have so far.
Reply With Quote
  #4 (permalink)  
Old Dec 17th, 2007, 14:45
New Member
Join Date: Feb 2007
Location: Bath
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Floating over text

thanks for that but this is not an IE issue ... this is only happening in FF and Safari. i need the container to automatically expand larger than 600 pixels automatically. if i change the container to auto it resizes to about 50 pixels in height
Reply With Quote
  #5 (permalink)  
Old Dec 17th, 2007, 14:48
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,375
Blog Entries: 13
Thanks: 1
Thanked 14 Times in 12 Posts
Re: Floating over text

can you post a link please. (sorry being lazy)

thanks,
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #6 (permalink)  
Old Dec 17th, 2007, 14:56
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 967
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: Floating over text

@ihateasp - min-height does exactly that; sets a minimum height for an element but allows for expansion when necessary (which will work in FF, IE7, Opera etc)

IE6 does not understand min-height, so we specifically tell IE6 a height (using the * html hack) which IE6 then incorrectly understands as min-height.


EDIT: On a side note, do you have floated elements within this container? This will affect the expansion of the container in FF (and possibly Opera and Safari) but not IE6 or IE7 (which incorrectly expand the container)
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)

Last edited by Aso; Dec 17th, 2007 at 14:58.
Reply With Quote
  #7 (permalink)  
Old Dec 17th, 2007, 14:59
New Member
Join Date: Feb 2007
Location: Bath
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Floating over text

Here ya go ...

http://systemagic.org.uk/networkcommercial/services.asp
Reply With Quote
  #8 (permalink)  
Old Dec 17th, 2007, 17:25
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 967
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: Floating over text

Ok, I know what everyone's going to scream, so I'll do it this time

Validate your markup! (25 Errors)

And why have you got table elements in there? I can't see any need for them.

Ok, for your container you've got
Code: Select all
.container {
width: 940px;
min-height:600px;
height:auto;
height:600px;
...}
Height: auto and min-height: 600px are doing nothing, because your final declaration height: 600px is overriding them.

Get rid of height: auto and min-height: 600px, then add this somewhere else
Code: Select all
* html .container {
height: 600px;
}
This is an IE6 specific declaration, as mentioned earlier
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #9 (permalink)  
Old Dec 18th, 2007, 08:16
New Member
Join Date: Feb 2007
Location: Bath
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Floating over text

thanks for all the help guys.. it must have something to do with the fact that I'm pulling in dynamic data. I'm goiing to go back to the drawing board withthis one.


Thanks again for all the help and advice.
Reply With Quote
Reply

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Headings floating left and right jonnymorris Starting Out 5 Jul 21st, 2007 22:27
Floating a SWF file?? iStylus Web Page Design 6 Apr 17th, 2007 11:59
Text floating out of the container in FF Sporky Web Page Design 3 Dec 8th, 2006 12:07
floating problems... gogogadgetearl Web Page Design 0 Jul 16th, 2005 04:25
Floating Without tables jcschott Web Page Design 3 Apr 19th, 2005 16:22


All times are GMT. The time now is 01:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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