Take a look at: http://www.geocities.com/stanio/test/ie_and_floats.html
Basically I got such content blocks:
<div class="someblock">
<img class="preview" ...>
<p>...</p>
<div class="clear"></div>
</div>
Where the "preview" image is floated to the right and the "clear"
element has 'clear: both' style to ensure the parent container will
extend to the floated image height at minimum.
The problem I encounter with Internet Explorer is when the normal
content is shorter than the floated image: notice the container
block left edge extends to the page boundaries, although there
should be a padding (from the parent UL element).
I've tried various tweaks but nothing have helped. Has anybody
encountered such issue with IE and have some workaround in mind?
--
Stanimir 16 2451
Stanimir Stamenkov <s7****@netscape.net> wrote: Take a look at:
http://www.geo cities.com/stanio/test/ie_and_floats.html
Ever thought of getting off geocities? It was a neat idea when it WAS
geocities, and virtual hosting was relatively new and expensive.
Nowadays you can pick up hundreds of megabytes for 10/mo or less,
server db, ftp access of course, and whatever else.
The problem I encounter with Internet Explorer is when the normal content is shorter than the floated image: notice the container block left edge extends to the page boundaries, although there should be a padding (from the parent UL element).
Howabout someblock width?
body { background: white; color: black }
.someblock {
display: block;
background: #d7d7d7;
margin-bottom: 0.5em;
padding: 1px;
width: 100%;
}
img.preview {
width: 5em;
height: 7em;
float: right;
margin-left: 0.5em;
border: 1px dashed;
}
.clear { clear: both }
li {
margin-left: 2.5em;
padding-left: 0;
}
/Mark Johnson/: Howabout someblock width?
.someblock { ... width: 100%; }
Cool :-)
That did it - thank you, Mark.
--
Stanimir
/Spartanicus/: Ah, I'd suggest using more appropriate markup: http://www.spartanicus.utvinternet.ie/test/stanimir.htm
Not that much for the markup :-) but much thanks for the
height/max-height and the child selector tip:
li {
...
height: 9em;
}
ul > li {
height: auto;
min-height: 9em;
}
Sometimes I just forget what "miracles" IE is capable of, huh.
--
Stanimir
Stanimir Stamenkov <s7****@netscape.net> wrote: Ah, I'd suggest using more appropriate markup: http://www.spartanicus.utvinternet.ie/test/stanimir.htm Not that much for the markup :-)
Unlike your original div mess, it's clean and appropriate for the
content.
but much thanks for the height/max-height and the child selector tip:
li { ... height: 9em; } ul > li { height: auto; min-height: 9em; }
Wrong, use the original code (without spaces), or it will fail.
--
Spartanicus
/Spartanicus/: Unlike your original div mess, it's clean and appropriate for the content.
Actually the only superfluous DIV was that of the "clear" element.
Now it is:
<div class="someblock">
<img class="preview" ... >
<p>...</p>
</div>
This is just for the test case, but actually in the place of the
paragraph I have couple of list elements. I need the container DIV
to group and separate that data from a following it different class
list representing child items with the same structure.
<ul class="tree">
<li>
<strong class="item-label">Item 1</strong>
<div class="item-content">
<img class="preview" ... >
<ul class="spec">
...
</ul>
<ul class="spec">
...
</ul>
</div>
<ul class="tree">
...
</ul>
</li>
....
</ul>
I don't need Hx elements for the item labels since I don't know how
many levels I may need - I already got H1, H2 and H3 outside this
structure.
BTW, using the 'min-height' solution I could even place the
"preview" image as a background of the "item-content" DIV. but much thanks for the height/max-height and the child selector tip:
li { ... height: 9em; } ul > li { height: auto; min-height: 9em; }
Wrong, use the original code (without spaces), or it will fail.
Hmm, weird - it works fine by my side.
--
Stanimir
Somehow Spartcanicus' reply to Stanmir went missing, and I'm not sure
if a problem that appears to be the same as the original query was
resolved in the exchange.
My problem is that a list that has a left margin in galeon, mozilla,
etc, looses it in IE. Furthermore, the image left margin also
disappears:
ul.parents {
margin-left: 2em;
...
}
li.up {
list-style-image: url(../bin/arrow-b.png);
height: 1.4em;
margin-left: -2em;
}
<ul class="parents">
<li class="up"><a href="target">description of target</a>
</li>
</ul>
--
Haines Brown br****@hartford-hwp.com kb****@arrl.net www.hartford-hwp.com
/Haines Brown/: My problem is that a list that has a left margin in galeon, mozilla, etc, looses it in IE. Furthermore, the image left margin also disappears:
ul.parents { margin-left: 2em; ... }
Mozilla's default stylesheet puts left padding of 40px on the UL
elements, instead of left margin, so while the above overrides the
IE's default stylesheet it just adds margin in Mozilla, so:
li.up { list-style-image: url(../bin/arrow-b.png); height: 1.4em; margin-left: -2em; }
<ul class="parents"> <li class="up"><a href="target">description of target</a> </li> </ul>
with Mozilla you end up:
2em + 40px - 2em = 40px
while with IE or Opera:
2em - 2em = 0
--
Stanimir
Stanimir Stamenkov <s7****@netscape.net> writes: Mozilla's default stylesheet puts left padding of 40px on the UL elements, instead of left margin, so while the above overrides the IE's default stylesheet it just adds margin in Mozilla, so:
li.up { list-style-image: url(../bin/arrow-b.png); height: 1.4em; margin-left: -2em; } <ul class="parents"> <li class="up"><a href="target">description of target</a> </li> </ul>
Stanimir,
Thanks for the information that Mozilla has a default 40px left
padding. I believe I can override this inherited value to get the same
positioning of the list in Mozilla and IE with:
ul.parents {
padding-left: 0em;
margin-left: 40px;
}
I believe this negates Mozilla's default padding, and then it puts
40px back in for both Mozilla and IE to use. While that gets ride of a
complicating factor, it does not resolve my basic problem.
As best I can make out, when list-style-image substitutes a symbol
image for the default UL bullet, Mozilla and EI place the image
differently. In Mozilla, the left edge of the graphic is located in
the position previously taken by the UL default bullet, while IE
places the right edge of the graphic in the position previously taken
by the UL bullet. Therefore, Mozilla shifts the LI to the right a
distance equal to the width of the symbol image in relation to its
position with IE. At least this is how I see it.
Problem is, I don't know how to get both browers to locate the symbol
image the same way.
--
Haines Brown
/Haines Brown/: As best I can make out, when list-style-image substitutes a symbol image for the default UL bullet, Mozilla and EI place the image differently. In Mozilla, the left edge of the graphic is located in the position previously taken by the UL default bullet, while IE places the right edge of the graphic in the position previously taken by the UL bullet. Therefore, Mozilla shifts the LI to the right a distance equal to the width of the symbol image in relation to its position with IE. At least this is how I see it.
Problem is, I don't know how to get both browers to locate the symbol image the same way.
I'm not sure if I've understood your exact problem, but:
It is a known fact currently browsers don't have good standard
support for generated content and control over the list item
markers. That's why it is suggested one could use background image
instead of 'list-style-image' to have greater control over the
presentation:
<ul>
<li>A list item</li>
<li>Another item</li>
<li>One more item</li>
</ul>
where you style the LI element something like:
li {
list-style: none;
background-image: url("bullet.png") no-repeat left top;
padding-left: 20px /* suppose your bullet image is 15px wide
* and you want 5px distance from the text */
}
There are on-line examples available but I don't remember pointers
right now.
--
Stanimir
Stanimir Stamenkov <s7****@netscape.net> writes: It is a known fact currently browsers don't have good standard support for generated content and control over the list item markers.
Yup, that's the problem.
That's > why it is suggested one could use background image instead of 'list-style-image' to have greater control over the presentation:
Thanks for this suggestion, for it fixed most problems nearly
perfectly. Here, for whatever it's worth, is my markup:
ul.parents {
list-style-type: none; /* get rid of bullet */
padding-left: 0px; /* equalize browsers */
margin: 1em 0px -0.3em 4px;
}
li.up {
background-image: url(../bin/arrow-b.png);
background-repeat: no-repeat;
padding-left: 30px; /* set indent of the list line*/
height: 1.4em;
}
.link-up {
font-weight: bold;
position: relative;
top: 0.2em; /* adjust rel.pos.image and text */
}
<ul class="parents">
<li class="up"><a href="index.html">
<span class="link-up">link text</span></a>
</li>
--
Haines Brown br****@hartford-hwp.com kb****@arrl.net www.hartford-hwp.com
Haines Brown wrote: Stanimir Stamenkov <s7****@netscape.net> writes:
That's > why it is suggested one could use background image instead of 'list-style-image' to have greater control over the presentation:
Thanks for this suggestion, for it fixed most problems nearly perfectly.
So what happens for those who browse with image loading off? They get no
marker at all?
--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
kchayka <us****@c-net.us> writes: Haines Brown wrote:
Stanimir Stamenkov <s7****@netscape.net> writes:
That's > why it is suggested one could use background image instead of 'list-style-image' to have greater control over the presentation:
Thanks for this suggestion, for it fixed most problems nearly perfectly.
So what happens for those who browse with image loading off? They get no marker at all?
Yes, that's true. But the alternative is inconsistency between Mozilla
and IE, and in my case that inconsistency can be confusing. The lack
of any marker at all is perhaps less confusing than misplaced
markers. That may not be so in other situations, though.
--
Haines Brown
Haines Brown wrote: The lack of any marker at all is perhaps less confusing than misplaced markers.
It depends on the list content. If there is any line wrapping at all,
lack of a marker can create real readability problems. Extra margin
between list items might help in that event, but not if the list
contains paragraphs or other whitespace within the text.
That may not be so in other situations, though.
Yup.
--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Charles Blaquière |
last post by:
While noodling around, looking for a good layout for an "events calendar"
page, I came upon a problem that has me stymied.
Have a look at http://kpuc.org/events/upcoming-2.html .
The basic...
|
by: Geoff Hague |
last post by:
I've decided I need to rebuild my website from scratch to work properly
accross browsers (the previous version of the site worked fine in IE6, but
was really wonky in other browsers).
What I'm...
|
by: Chris Beall |
last post by:
See
http://pages.prodigy.net/chris_beall/BeallSprings/WC.Deed%20GG.116-17.html
using the CSS at
http://pages.prodigy.net/chris_beall/BeallSprings/BSstyle.css
The page is a transcript of a...
|
by: Fernando Barsoba |
last post by:
Hi,
After following the advice received in this list, I have isolated the
memory leak problem I am having. I am also using MEMWATCH and I think it
is working properly.
The program does some...
|
by: georgino |
last post by:
I decided to go with CSS and drop my <tableskills however I have some
issues with it. The new page I design atm is at:
http://www.labo.sk/web-designs/. Anyone able to help on this one? I am
really...
|
by: shapper |
last post by:
Hello,
I have the following code:
<div id="outer" class="outer">
<ol>
<li>Item outer 01</li>
<li>Item outer 02</li>
</ol>
<div id="inner" class="inner">
|
by: Harry |
last post by:
Using IE7, I'm trying to display a table in a horizontal manner by
floating the rows.
The following html does not work, displaying the table vertically as if
the rows were not floated.
This same...
|
by: luca bertini |
last post by:
Hi,
i have strings which look like money values (ie 34.45)
is there a way to convert them into float variables?
everytime i try I get this error: "numb = float(my_line) ValueError:
empty string...
|
by: maya |
last post by:
hi,
here,
http://www.mayacove.com/design/sd/test2.html
<div class="entry"has a bottom-margin of 20px.. but it's ignored if
divs inside it have "float" property.. (put borders around divs for...
|
by: BMc |
last post by:
I just want to take a moment to say thank you to so many of you who
posted a response to my request for help about the problem with THE GAP
(see below?)!
Your suggestions were not only a...
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |