473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

A framed block next to a float

Hi crowd,

Please have a look at this page, where I try to have a framed block next to
a floated one: http://yo.dan.free.fr/float_n_div.html

Above is the best result I got so far. Works in (decently recent) IE and
gecko-based browsers, unperfect in Opera. Below is what I try to avoid: the
border and the background of the grey block extend below the red square
(normal behaviour, but unpleasant one).

Does my trick fail in browsers I have not tested? Do you have a better
solution?

--
Daniel Déchelotte
http://yo.dan.free.fr/
Jul 21 '05 #1
2 1616
Daniel Déchelotte <ma**********@fr.club-internet.invalid> wrote:
Please have a look at this page, where I try to have a framed block next to
a floated one: http://yo.dan.free.fr/float_n_div.html

Above is the best result I got so far. Works in (decently recent) IE and
gecko-based browsers, unperfect in Opera. Below is what I try to avoid: the
border and the background of the grey block extend below the red square
(normal behaviour, but unpleasant one).

Does my trick fail in browsers I have not tested? Do you have a better
solution?


Why not just give the grey box a margin-left of slightly more than
10em?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #2
Steve Pugh a écrit :

| Daniel Déchelotte <ma**********@fr.club-internet.invalid> wrote:
|
| >Please have a look at this page, where I try to have a framed block next
| >to a floated one: http://yo.dan.free.fr/float_n_div.html
|
| Why not just give the grey box a margin-left of slightly more than
| 10em?

Because of the case where the text is big enough/the viewport is narrow
enough to let the framed box "spill" below the floated box.

--
Daniel Déchelotte
http://yo.dan.free.fr/
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Ross | last post by:
I sometimes place a sidebar on a Web page, using the following: ..sideright { float: right; background-color: #fff; width: 40%; font-size: 90%; text-align: justify; margin-left: 1em;...
14
by: Florian Brucker | last post by:
Hi! Here's what it should look like: <style type="text/css"> span.h1 { border-style:solid; border-width:0px; border-color:#000000; border-bottom-width:2px;
3
by: Ben | last post by:
Hi There I am doing some unit testing at the moment, and the majority of the leg work involves taking two objects (expected vs actual) and verifying that their properties are equal. The objects...
2
by: ruby_bestcoder | last post by:
Hi Im having problem in firefox with display:none/block. I have essentially 3 li elements. In each element there are a few nested div:s. Clicking on one of the divs, makes another div to...
4
by: Dave | last post by:
TIA for the help.....this should be easy for a pro....I need the two divs with text to display on the same line at the top of the container..??? <html> <head> <style> body...
3
by: kent | last post by:
Hi, For the code below, only "aaa" has a red background but "bbb" and "ccc" don't have it: <div style="background: red">aaa <div style="float:left">bbb</div> <div...
6
by: Harlan Messinger | last post by:
Please take a look at http://www.gavelcade.com/list_next_to_float.html How can I style a list so that if it appears next to a left-floated box as the first list does in this example, the list...
2
dlite922
by: dlite922 | last post by:
The frustrating thing with coding with divs instead of tables is trying to get them to "act" like they're inside each other. I have a container div, and three sub-divs. First contains a plus...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.