473,396 Members | 2,154 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,396 software developers and data experts.

Inline DIVs Under Netscape/Opera

i want to display a series of inline, fixed-width DIVs that will wrap into
columns - a table, basically. i can do it under Internet Explorer, but the
same code under Netscape or Opera does not behave as expected. the DIVs
"collapse" into small rectangles (i put a border around them so i could
see), but their contents (some middle-aligned text) span the width of the
page. if not for the borders that i added, it would appear that each DIV was
width: 100%. rather than a number of smaller columns, i get one big, fat
column. what am i doing wrong? here's the code (with only two columns, for
simplicity):

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<title></title>
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=us-ascii" />
<style type="text/css">
div.productListing {
display: inline;
width: 128px;
text-align: center;

/* temp */
border: solid 1px red;
}
</style>
</head>
<body>

<div class="productListing">
<div class="productImageContainer"><img class="productImage" src="#"
alt="Cufflinks" /></div>
<div class="productName">Gold Cufflinks</div>
<div class="description">They are cufflinks and they are gold.</div>
<div class="price">$59.90</div>
</div>

<div class="productListing">
<div class="productImageContainer"><img class="productImage" src="#"
alt="More Cufflinks" /></div>
<div class="productName">Gold Cufflinks</div>
<div class="description">These cufflinks are also gold.</div>
<div class="price">$69.90</div>
</div>

</body>
</html>
Jul 17 '05 #1
2 1903
This is a html issue, post in a news group for html
--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Adam Siler" <as****@icglp.com> wrote in message
news:11*****************@fe1.columbus.rr.com...
i want to display a series of inline, fixed-width DIVs that will wrap into
columns - a table, basically. i can do it under Internet Explorer, but the
same code under Netscape or Opera does not behave as expected. the DIVs
"collapse" into small rectangles (i put a border around them so i could
see), but their contents (some middle-aligned text) span the width of the
page. if not for the borders that i added, it would appear that each DIV was width: 100%. rather than a number of smaller columns, i get one big, fat
column. what am i doing wrong? here's the code (with only two columns, for
simplicity):

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<title></title>
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=us-ascii" />
<style type="text/css">
div.productListing {
display: inline;
width: 128px;
text-align: center;

/* temp */
border: solid 1px red;
}
</style>
</head>
<body>

<div class="productListing">
<div class="productImageContainer"><img class="productImage" src="#"
alt="Cufflinks" /></div>
<div class="productName">Gold Cufflinks</div>
<div class="description">They are cufflinks and they are gold.</div>
<div class="price">$59.90</div>
</div>

<div class="productListing">
<div class="productImageContainer"><img class="productImage" src="#"
alt="More Cufflinks" /></div>
<div class="productName">Gold Cufflinks</div>
<div class="description">These cufflinks are also gold.</div>
<div class="price">$69.90</div>
</div>

</body>
</html>

Jul 17 '05 #2
Adam Siler wrote:
... what am i doing wrong? ...


you left out the <?php ... ?> tags
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #3

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

Similar topics

1
by: Jeff Thies | last post by:
I have something like this: <span style="width:12ex; text-align: right">field label</span><input type="text" ...> (I suppose it may be better to do that with label. I'm not really sure what...
3
by: Peter Jenkins | last post by:
I have some divs I am using to get a two column layout for a section of a page, like so; <div1> <div2> <div3> blah blah blah blah blah blah blah blah...
0
by: nina | last post by:
Hi all, I've been working on a site that involves content in multiple scrolling DIVs on a page which is loaded inside multiple framesets. the layout is cramped as all hell but I'm not going to...
8
by: Harlan Messinger | last post by:
To produce a side-by-side three-column layout with a uniform, bordered top and bottom , I used the same HTML with two sets of styles. The two versions are at ...
6
by: Nicolai P. Zwar | last post by:
Hi there, everybody. This here is a sample page of what appears to be a Netscape/Mozilla positioning problem. I posted a the problematic code down at the bottom of this message, and you can see...
30
by: Adam Siler | last post by:
i want to display a series of inline, fixed-width DIVs that will wrap into columns - a table, basically. i can do it under Internet Explorer, but the same code under Netscape or Opera does not...
6
by: Tony T | last post by:
Can anyone help me with this - it may be obvious, but I just can't see it. I'm working with PC and WinME. In IE6, the two divs inside the wrapping div have no space between them, which is how I...
6
by: axlq | last post by:
I've spent most of the day struggling with what I thought would be a trivial problem. I have a hidden element that appears, outside of the normal flow, when the mouse hovers over an inline...
7
by: massic80 | last post by:
Hi everybody! I'm making a page for an exam at uni. In two DIV blocks of it there should appear (and disappear) some "icons", due to XML messages, so I dunno how many of them should I can obtain;...
5
by: Awok | last post by:
Hi, i've been stuck trying to get the following code to display correctly in IE in which i've come across many diffrent theories but none which have worked possibly the box model problem. ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...
0
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...
0
agi2029
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,...

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.