Hi
Sorry no screen shots or links...I want to achieve the following visual
effect:
I want three boxes to appear on screen, all within a parent box (so 4
in total).
Concerning the three inner boxes, I want them to appear in a two column
format. One box in the left hand column that will contain an image and
the two other boxes stacked one above the other in the right hand
column that will contain text.
Using relative positioning, I can achieve what I want for the three
internal boxes and this works in Internet Explorer (IE) and in FireFox
(FF).
However, when I add the parent box it "correctly" surrounds the
daughter boxes in IE, but appears as a thin strip in FF (i.e. the
daughter boxes hang out of the bottom of this box).
I can't use absolute positioning because I don't know how much text
these will contain, or how big the image will be.
The HTML text is simply three <div/elements embedded within a parent
<div/>.
Any help would be most appreciated in this.
Thanks
Griff 13 2471
Griff wrote:
Hi
Sorry no screen shots or links...I want to achieve the following visual
effect:
I want three boxes to appear on screen, all within a parent box (so 4
in total).
Concerning the three inner boxes, I want them to appear in a two column
format. One box in the left hand column that will contain an image and
the two other boxes stacked one above the other in the right hand
column that will contain text.
Using relative positioning, I can achieve what I want for the three
internal boxes and this works in Internet Explorer (IE) and in FireFox
(FF).
However, when I add the parent box it "correctly" surrounds the
daughter boxes in IE, but appears as a thin strip in FF (i.e. the
daughter boxes hang out of the bottom of this box).
I can't use absolute positioning because I don't know how much text
these will contain, or how big the image will be.
Guessing, but would the inner boxes be floated. If so declare width and
height on containing div.
Louise
Guessing, but would the inner boxes be floated. If so declare width and
height on containing div.
Louise
Hi Louise
But...I don't know how big the parent box will need to be, because I
don't know how big the daughter boxes will be.
Give me 10 mins or so and I'll post some example HTML and CSS...
Thanks
Griff
Griff schrieb:
Give me 10 mins or so and I'll post some example HTML and CSS...
No, post the URL to a minimal example instead.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Okay - here's the tidied up code....The effect in both IE and FF is
that the "daughter" boxes appear below the parent box.
NOTE: if I add [height:5px;] to the CSS for div#Border then it works as
expected in IE, but not in FF. It seems that I'd need to know the
ABSOLUTE height of the parent box, but without knowing the amount of
text of the size of the image I don't see how I can guess at that.
First the HTML
<body >
<div id="Border">
<div id="Left">Left </div>
<div id="Right">
<div id="Top">Top</div>
<div id="Bottom">Bot tom</div>
</div>
</div>
</body>
Now the CSS
body
{
margin:0px;
padding:8px;
}
div
{
padding:1em;
margin:1em;
border: solid 1px black;
}
div#Border
{
background-color:#333;
}
div#Left
{
background-color:#555;
position:relati ve;
float:left;
}
div#Right
{
background-color:#777;
position:relati ve;
float:right;
}
Griff wrote:
Okay - here's the tidied up code....The effect in both IE and FF is
that the "daughter" boxes appear below the parent box.
NOTE: if I add [height:5px;] to the CSS for div#Border then it works as
expected in IE, but not in FF. It seems that I'd need to know the
ABSOLUTE height of the parent box, but without knowing the amount of
text of the size of the image I don't see how I can guess at that.
<cut markup>
For a more likely approach especially as the generated height of the
left boxes is indeterminate, see http://www.boclair.com/test/contained-floats.html
Louise
Okay - that works in IE but not in FF. I'm using FF 2 beta 1
Griff wrote:
I want three boxes to appear on screen, all within a parent box (so 4
in total).
Go and read brainjar.com and their article on "css positioning"
(Floats are _meant_ to hang out of the bottom of things, unless you
tell them not to. IE gets things wrong again).
Andy Dingley wrote:
Griff wrote:
>I want three boxes to appear on screen, all within a parent box (so 4 in total).
Go and read brainjar.com and their article on "css positioning"
(Floats are _meant_ to hang out of the bottom of things, unless you
tell them not to. IE gets things wrong again).
Or check http://www.quirksmode.org/css/clearing.html for a nice compact
decription/solution.
Grtz,
--
Rik Wasmus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ken Kast |
last post by:
Here's my situation. I have a statically positioned table that has an image
in a cell. I also have some layers, defined by absolute-positioned DIVs for
some animation. Everything works until I scroll/resize. Then the image
"moves" on the screen but the animation doesn't. The net effect is that
their relative positioning changes. I'd like to have it be that they would
stay in the same relative position. I want to keep the image as an...
|
by: Stephen Weatherly |
last post by:
Could anyone please help me with a problem I am having with my table
widths???
If I have 2 images within a td tag, but using CSS relative positioning I
position one over the top of the second (I am placing a transparent gif
over the top of a normal gif) then the width of my table is large enough
to accommodate both images side by side
My browsers (both IE ad Firefox) do not appear take into account the
relative positioning of my...
|
by: Catherine Lynn Wood |
last post by:
I need to know how to overlap DIV content within 'relative' associated
rendering. I am building div layers in the middle of a page and when I set
positioning to absolute in the CSS, it references back to 0,0 on the entire
page. If I set it to relative, the div layers will not overlap as needed.
I prefer to avoid javascripting an 'innerHTML' re-write of a single div and
would instead like to build two layers that can reside at the same...
|
by: Wilhelm Kutting |
last post by:
Hi i like to make a complex layout with css.
All the content is inside a container div.
I like to get the following sequence without the css-layout:
logo
title
mainnav
content
i can only get the results when i use negative positioning.
|
by: Markus Ernst |
last post by:
Hello
Reading the follwing document:
http://www.w3.org/TR/WD-positioning-970131#In-flow
it seems very clear that position:relative should be relative to the parent
element. So in the following test case element1 and element2 should be
placed side by side inside a centered white container element:
http://www.markusernst.ch/test.htm
| |
by: Fred Nelson |
last post by:
Hi:
I'm working on one of my first web applications in asp.net 2.0 and I'm
having a problem with absolute versus relative positioning of controls
that I place on pages that use master pages with Content Place Holders.
The controls placed in a content area with absolute or relative
positioning can easily "drift" beyond my Content Place Holder.
I'm trying to put a "footer" on every page of the site and this is
|
by: nonsensitor |
last post by:
I'm just learning xhtml & css, primarily from westciv's online tutorials and css guide. I've run into a couple of problems with a page I'm developing that I can't figure out.
The first problem is that I would like to display some text on top of an image within the header. I've tried using absolute positioning to specify where the phone number should appear in relation to the parent div (#header). However the text appears to be positioned in...
|
by: mikewse |
last post by:
I have a strange problem where it seems IE is doing the correct layout but Firefox and Safari isn't. I think I'm probably wrong, and there is something in the standards that say behaviour should be like Firefox does, but could someone tell me what is right?
In the below code I have element trees with three DIVs; the outer DIV establishes a positioning context and the "middle" DIV uses absolute positioning to put its top left corner in the...
|
by: Cruelemort |
last post by:
All,
I have a div in my page that has a set width of 1000px, height of
200px, inside this i declare two more div's, both relatively
positioned and floated left, the first is placed to the top left of
the box and is a 30px square, the other one is set to 970px and is
naturally positioned next to the square and so fills all the way to
the right hand edge of the box.
Now i need the second (wider) box to overlap the square and so start
|
by: slaterino |
last post by:
Hi,
I am in the process of creating a web site at the following address:
http://www.cca-ltd.co.uk/New/en/index.html
At the moment when you hover over the navigation links a list appears
on the training and support tabs. This works fine in Firefox but in IE
(I have v7.0) the list jumps to the right instead of dropping straight
down from the menu. If i change the positioning on the #navstrip li ul
element to relative this fixes the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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...
| |