Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 08-07-2008, 07:31 AM Recognising a Float
Galaxian's Avatar
Dingleberry!

Posts: 825
Name: Rich
Location: United Kingdom
Trades: 0
I'm having trouble with items that are 100% in width and a float is in the same container.

For example

Code:
<div style="float: right;">testtestest</div><h1>Test</h1>
asdasdasdasdhasuasdjahsdkjasdjkhasd
The h1 would run through the float. This interferes with links and if it has a border then it is visible under the float.

Any way of fixing?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
 
Register now for full access!
Old 08-07-2008, 09:43 AM Re: Recognising a Float
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
a floated element cannot be 100% wide, it HAS to have a fixed width applied to it.

Floats exist in a separate plane (or layer if it makes it easier) to block elements and you have to tell the non-floated block elements how much space to allow for this plane.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-07-2008, 01:59 PM Re: Recognising a Float
Galaxian's Avatar
Dingleberry!

Posts: 825
Name: Rich
Location: United Kingdom
Trades: 0
I'm not trying to 100% a floated element. Though I have found a quickfix which is apply overflow:auto; to the offender. Wish there was a more global way to fix it though.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by LadynRed; 08-07-2008 at 02:56 PM..
Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 08-07-2008, 02:57 PM Re: Recognising a Float
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
The point here is that when you float something, it MUST have a defined width.
Then you must CLEAR your floats.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-07-2008, 04:41 PM Re: Recognising a Float
Galaxian's Avatar
Dingleberry!

Posts: 825
Name: Rich
Location: United Kingdom
Trades: 0
It's nothing to do with clearing it I guess. It's just that H1 has a border and it goes through the float.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 08-07-2008, 04:46 PM Re: Recognising a Float
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Set the h1 to display: inline.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Recognising a Float
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.15987 seconds with 12 queries