473,653 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1626
Daniel Déchelotte <ma**********@f r.club-internet.invali d> 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**********@f r.club-internet.invali d> 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
5479
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; padding: 2% } ..sideleft { float: left; background-color: #fff;
14
2522
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
1485
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 that I am testing and their properties are diverse, including enums, basic system types, arrays and nested types. The objects themselves were not written by me, and do not have any overrides for equals, compare ... etc.
2
3355
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 display: block or none. Again this works in IE. In ff it has a bug. When the display is none for a div in the first li, then the next li (the one underneath) moves up to the right, looking very ugly. Is there someone who has had the
4
8675
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 {background-color: $background-color; background-image:url('') ; font:normal $global-font-size $text-font; text-align:center;
3
4260
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 style="float:left">ccc</div> </div>
6
2929
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 items, with their bullets, still appear indented relative to the text above and below the list (i.e., without having the bullets overlapping the float), without messing up the appearance if the list *doesn't* happen to land next to the float, as...
2
5219
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 sign Second contains a Title Third contains a price
0
8283
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8590
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2707
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.