473,799 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Table-less design question

I'm trying to do my site without table unless absolutely necessary, and
I've run into a problem I'm not sure how to get around. I have a div
with float:right that contains some images (the outer edges) and a div
sandwiched between two of them. The sandwiched div has a background
image which is to tile based upon it's width. The thing is, divs are
normally set to display:block, which causes it to be placed on it's own
line. If I set it's display to inline, it collapses. Does anyone know a
trick to get around this, or should I just use a table instead?

#middle {float: right;}
#topborder {background-image: url(images/content3.gif); width: 300px;
height: 53px;}

<div id="middle"><im g src="images/sign_bottom.gif " alt="Making Homes
Beautiful Since 1992" border="0" /><img src="images/content1.gif" alt=""
border="0" /><div id="topborder"> </div><img src="images/content2.gif"
alt="" border="0" /></div>

You can see what I mean at www.aaron-chandler.com, where the site is
hosted temporarily.

Thanks,
Aaron

Jul 20 '05 #1
1 1680
On Fri, 02 Jul 2004 13:48:04 -0700, Aaron <ag********@com cast.not>
wrote:
I'm trying to do my site without table unless absolutely necessary, and
I've run into a problem I'm not sure how to get around. I have a div
with float:right that contains some images (the outer edges) and a div
sandwiched between two of them. The sandwiched div has a background
image which is to tile based upon it's width. The thing is, divs are
normally set to display:block, which causes it to be placed on it's own
line. If I set it's display to inline, it collapses. Does anyone know a
trick to get around this, or should I just use a table instead?

#middle {float: right;}
#topborder {background-image: url(images/content3.gif); width: 300px;
height: 53px;}

<div id="middle"><im g src="images/sign_bottom.gif " alt="Making Homes
Beautiful Since 1992" border="0" /><img src="images/content1.gif" alt=""
border="0" /><div id="topborder"> </div><img src="images/content2.gif"
alt="" border="0" /></div>


As much as I hate to suggest it, given that your design is completely
based around pixel-oriented images, you might enjoy better luck
abandoning the float approach and instead using CSS positioning with
pixel values to get the images in the right places to fit together.

You can still retain some semblance of dynamic scaling by having, at
the root of the document, a couple of elements with widths specified
in percentages, and then use position:absolu te to position the child
images relative to the dynamic boxes. (position:absol ute is supposed
to be relative to the containing element, but I seem to remember some
browser bugs in this regard)

Unrelated to your question, I suggest you also try to throw in some
more semantic markup there so that it'll work more nicely for text or
speech browsers. Specifically, only one of your "Making homes
beautiful" images needs alternative text; the rest can just have
alt="". Same for "Coastal Roofing Company". Put the main heading
images inside a <h1> element so that the text is rendered as a
heading. If you can persuade browsers to cooperate, you should also
make your navigation bar some kind of list, such as UL. You can then
use CSS to stop it being a list for graphical browsers:

ul {
list-style: none;
margin: 0;
padding: 0;
}
ul li {
margin: 0;
padding: 0;
}
(although you'll probably want to use some classes or ids there rather
than setting *all* elements)

The best way to see if you've got it right is to load it into Opera
and turn on "User mode" (so it'll ignore your CSS) and turn off image
loading. Any images with alt="" will vanish completely, and others
will be rendered as the surrounding markup dictates, albeit with some
boxes around the images. You will have to ensure that all of your CSS
is in a stylesheet rather than in STYLE attributes, though. You could
also try lynx or links, which are popular text-only browsers.

(Making it nice for non-graphical browsers benefits you because
Google's indexing robot is a non-graphical browser!)

Good luck,
-Claire
Jul 20 '05 #2

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

Similar topics

15
2676
by: Xah Lee | last post by:
Here's the belated Java solution. import java.util.List; import java.util.ArrayList; import java.lang.Math; class math { public static List range(double n) { return range(1,n,1); }
5
33663
by: Jim Garrison | last post by:
Scenario: 1) Create a GLOBAL TEMPORARY table and populate it with one (1) row. 2) Join that table to another with about 1 million rows. The join condition selects a few hundred rows. Performance: 4 seconds, the system is doing a full-table scan of the second table, and the Explain Plan output
4
6596
by: Gaz | last post by:
Hi, I need to have a table nested within another table. The tables are alongside each other visually speaking, and the nested table (on the right) can vary in size. My problem is that when the nested table has more rows than the first table, the first table (on the left) pads out its rows so that the table matches the height of the nested table. I don't want this it happen.. I just want the nested table to be longer than the first...
3
11386
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when building the database: 3:ERROR: table "country" does not exist 6:ERROR: table "customer" does not exist 11:ERROR: table "product" does not exist 15:ERROR: table "license" does not exist 19:ERROR: table "enduser" does not exist 24:ERROR: ...
4
15839
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
4
548
by: Simone Battagliero | last post by:
I wrote a program which inserts and finds elements in an hash table. Each element of the table is a dinamic list, which holds all elements having the same hash value (calculated by an int hashFunction(char *key, int elements) ), so the table is an array of dynamic lists. The version of the program I've attached to this message works fine; but it's the result of an accurate debugging. I discovered that my problems consisted in just 4 lines...
76
272586
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal Form), 3NF (Third Normal Form) and BCNF (Boyce-Codd Normal Form). There are others but they are rarely if ever used. A database is said to be Normalised if it is in 3NF (or ideally in BCNF). These steps are descibed as follows: Note: When attribute...
7
4829
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the expandable row, the hidden row is made visible with css. The problem is when i sort the rows, the hidden rows get sorted as well which i don't want and want to be moved (while sorting) relative to their parent rows. The following is my complete html code...
12
9140
by: Michael.Z | last post by:
Anyone who can help: Given a Table.h file I am writing a Table.c file. I keep getting the compile error: previous declaration of Table was here / conflicting types for I think the problem was the result of two pieces of code. First: typedef struct Table; /* in Table.c*/
5
4960
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
9686
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, 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...
0
9540
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,...
1
10222
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
9068
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, 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...
0
6805
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();...
0
5463
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...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
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.