473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to do rows of images without tables?

Hallo,
I'm building a page that wants to respect XHTML 1.0 strict and CSS2
specifics. In this page I have to present thumbnails arranged to cover the
entire width of the window, but there are problems that are easier to see
than to explain...
http://www.wildzone.it/stage/thumbs/...lleria=samburu
the CCS code is readable in a click. The document is correct in his xhtml
and css sintax, and the code has been completely cleared from other
contents.

This is my first attempt to do the layout of a site without making use of
tables, and I know that you are all expert in constructing pages using an
advanced CSS.
Since I'm trying to adjust the code for days, I wonder that that you are so
kind to take a look at it and suggest me something.
Thanks for any help

Roberto

Jul 21 '05 #1
20 3137
Roberto wrote on 09 mei 2005 in
comp.infosystem s.www.authoring.stylesheets:
I'm building a page that wants to respect XHTML 1.0 strict and CSS2
specifics. In this page I have to present thumbnails arranged to cover
the entire width of the window, but there are problems that are easier
to see than to explain...
http://www.wildzone.it/stage/thumbs/...lleria=samburu
the CCS code is readable in a click. The document is correct in his
xhtml and css sintax, and the code has been completely cleared from
other contents.

This is my first attempt to do the layout of a site without making use
of tables, and I know that you are all expert in constructing pages
using an advanced CSS.
Since I'm trying to adjust the code for days, I wonder that that you
are so kind to take a look at it and suggest me something.
Thanks for any help


div.thumbBox {
width: 115px;
float: left;
margin: 15px;

height:80px;
overflow: hidden;
border:#ddd dotted 1px;
text-align:center;
}

[The border is just temporary to show the effect]

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #2
in comp.infosystem s.www.authoring.stylesheets, Roberto wrote:
Hallo,
I'm building a page that wants to respect XHTML 1.0 strict
Then why are you using xhtml1.1 doctype?
http://www.wildzone.it/stage/thumbs/...lleria=samburu
[floated divs with width, variable height -> normal effect]
The document is correct in his xhtml and css s[y]ntax,


But it is not very good xhtml (empty title, wrongly used p element, empty
alt attributes)

KISS.
First, have the content.
Then, mark it up
Look.
Style.
If more markup is needed, add it.

Here, you have already overmarkupped your content, wrapping those images
to divs that has no other purpose. That is not needed for what you ask.

The problem is that when floating images that are different size, there
will be gaps, which are not too fun. I don't get why you are using
different height images, why not make them all same height?

I would use this CSS
img {margin:20px;}

and get rid of div elements (except the one containing them all)

If you do want columns (or captions) as well as rows (which you didn't
specify...), then you can
a) use different margins for different sized images
b) use those divs, and you need to make them same width and height
(add height:70px or whatever is height of biggest image to your css)
c) or use display:inline-block (not supported by FF, partially supported
by IE and Opera 7-8) and display:inline-table (Opera 5+)

IMHO, columns make no sence, so I never (again) use columns in image
gallery, unless they come naturally.

And forget XHTML, you are using it wrong way:
1) xhtml1.1 shouldn't be served with text/html
2) you put IE to quirks mode
3) just valid is not enough

Use HMTL4 strict. Especially if you did not understand the reasons.
(google for them, if you want to understand them.)

Also, you should send some cache information.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #3
On Mon, 9 May 2005 23:33:29 +0200, "Roberto" <de*********@de spammed.com>
wrote:
I'm building a page that wants to respect XHTML 1.0 strict...
Why? serves no purpose over HTML4.01
...and CSS2 specifics.
Well, except for the fact that CSS2.1 has not yet been formally approved
by the knight, it seems that good browsers in general are more in
adherence to that specification; that is if not CSS1 is fully sufficient
for what you want to suggest in the first place.
In this page I have to present thumbnails arranged to cover
the entire width of the window, but there are problems that
are easier to see than to explain...
Nah; the KISS principle will always work, have a look...

<http://www.fantasywoma n.nu/terra/terra01.html>

[...]
This is my first attempt to do the layout of a site without
making use of tables...


Yes, lets say that you have definitely started on the right track but
you are "overdoing" things a bit :-)

Other posters in this thread have given more specific info on that part
so I don't need to repeat it.

--
Rex
Jul 21 '05 #4
Thanks a lot, Evertian. It's ok now!

Jul 21 '05 #5
Hi Lauri,
I'm building a page that wants to respect XHTML 1.0 strict
Then why are you using xhtml1.1 doctype?


I correct myself. A PHP script checks if the client supports XTHML 1.1 or
1.0 and sends a correct header and doctype.

$xml = stristr($_SERVE R["HTTP_ACCEP T"],"applicatio n/xhtml+xml");
if($xml){
header("Content-Type: application/xhtml+xml; charset=ISO-8859-1");
print "<?xml version=\"1.0\" ?>\n";
print "<?xml-stylesheet href=\"common/style.css\"
type=\"text/css\"?>\n";
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';
}
else {
header("Content-Type: text/html; charset=ISO-8859-1");
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
}

[...]
The document is correct in his xhtml and css s[y]ntax,


But it is not very good xhtml (empty title, wrongly used p element, empty
alt attributes)


The document is intended to be just an example of what happens in the
original page. So the title is not important here. The alt text is not
shown because I'm going to insert captions under the thumbs instead.
Can you say why the p element is wrongly used?
KISS.
First, have the content.
Then, mark it up
Look.
Style.
If more markup is needed, add it.
ok I'll remember in the future :-)
By the way, I have already prepared the contents and the layout. I have
written this
page just to test if the cause of the problem was the thumbs or something
else in
the original page, and also to show it to you without all the unnecessary
code and
contents.
Here, you have already overmarkupped your content, wrapping those images
to divs that has no other purpose. That is not needed for what you ask.
you are right, but I used the divs because they have to embed images and
captions together, that are not shown in the example.
The problem is that when floating images that are different size, there
will be gaps, which are not too fun. I don't get why you are using
different height images, why not make them all same height?
yes, you're right. I'll do that

[...]
And forget XHTML,
I'm using XHTML because I want to make practice with it (first time for me),
and becasue w3c recommends it. It's seems to me that only very old browsers
doesn't support it, so why not?
you are using it wrong way:
1) xhtml1.1 shouldn't be served with text/html
the document is served as text application/xhtml+xml if the client support
it, otherwise as text/html.
2) you put IE to quirks mode
Lauri, what is quirks mode?
3) just valid is not enough
that's true
Use HMTL4 strict. Especially if you did not understand the reasons.
(google for them, if you want to understand them.)

Also, you should send some cache information.


which cache information is needed?

thanks for answering me
Roberto

Jul 21 '05 #6
Hi Jan,
I'm building a page that wants to respect XHTML 1.0 strict...


Why? serves no purpose over HTML4.01


I already replyed to Lauri about this point. Do you mean that it's still
better to use HTML 4.01 for compatibility reasons with all browsers?
...and CSS2 specifics.


Well, except for the fact that CSS2.1 has not yet been formally approved
by the knight, it seems that good browsers in general are more in
adherence to that specification; that is if not CSS1 is fully sufficient
for what you want to suggest in the first place.


Yes, CSS1 is not sufficient. My purpose is to use CSS 2.0 version. This is
approved, right?

thanks for answering, Jan

Roberto
Jul 21 '05 #7
Hi Jan,
I'm building a page that wants to respect XHTML 1.0 strict...


Why? serves no purpose over HTML4.01


I already replyed to Lauri about this point. Do you mean that it's still
better to use HTML 4.01 for compatibility reasons with all browsers?
...and CSS2 specifics.


Well, except for the fact that CSS2.1 has not yet been formally approved
by the knight, it seems that good browsers in general are more in
adherence to that specification; that is if not CSS1 is fully sufficient
for what you want to suggest in the first place.


Yes, CSS1 is not sufficient. My purpose is to use CSS 2.0 version. This is
approved, right?

thanks for answering, Jan

Roberto
Jul 21 '05 #8
On Tue, 10 May 2005, Roberto wrote:
I already replyed to Lauri about this point. Do you mean that it's still
better to use HTML 4.01 for compatibility reasons with all browsers?


This isn't a write-only group, you know. You'd do better to read it
and get an idea of what's gone before, rather than asking to be
spoonfed the same answers that have been posted countless times.

Jul 21 '05 #9
*Roberto*:

$xml = stristr($_SERVE R["HTTP_ACCEP T"],"applicatio n/xhtml+xml");
if($xml){


That's way too narrow-minded and violates the RFC (the number of which I
don't remember right now). What if the 'Accept' header gives a/x+x a
lesser priority than 'text/html'?
I've seen content negotiation done correctly in PHP, but it's more than
two lines---I suppose a little Web research will find you a good, free
script.
Jul 21 '05 #10

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

Similar topics

2
10645
by: scott | last post by:
Hi, I'm having some trouble with something that should be relatively easy. I want to update multiple rows in one of my database tables simultaneously. In my table I have these values: imageID image_order I want to be able to modify the image_order column where imageID = imageID.
3
12275
by: Christoph | last post by:
I'm delving into using ADO.NET for the first time. In fact, I've never done any database work using C# at all so all of this is new to me. Please bear that in mind if I am asking stupid questions. In reading the documentation for the "Update()" method of the SqlDataAdapter class, I see that it "Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated or deleted rows in the specified array of DataRow objects"....
12
1993
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they are initally added to the recordset. I create a dataset, which begins empty after the initial .Fill. Then I create several rows with some default information, leaving one
10
2321
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images. That is, images inline with the actual content of the blog itself. Is there an example that I can be pointed to, where I can examine some code and figure out how to do this? Frankly I haven't got a clue, aside from breaking the content up into...
61
4723
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the important part ... also work with backgrounds in other tags. I fail to see any wisdom in making SVG different than say PNG (of course the implementation of the rendering code would obvious be different). --
14
2281
by: Tristan Miller | last post by:
Greetings. Is it possible with CSS to have an HTML <tablesuch that even-numbered <trrows have one background colour, and odd-numbered <trrows have another background colour? This makes wide tables easier to read. I would like this to work by applying a CSS class to only the <table> element. Applying two different classes to alternate <trelements is undesirable, as then it would be impossible to add, delete, or sort table rows...
7
6601
by: Susan Mackay | last post by:
I have a data table that is connected to a database table with a data adapter in the 'standard' manner. However I want to be able to remove selected rows from the data table (i.e. no longer include them in the set that is displayed to the user) but I don't want to delete the corresponding row from the database. I've tried using the .Rows.Remove() method but an exception is thrown to say I don't have a 'delete' command in the data...
14
6984
by: Yas | last post by:
Hello, I have 2 tables, Table1 and Table2. I have copied all data from Table1 to Table2. However Table1 is dynamic it has new rows added and some old rows modified everyday or every other day... How can I continue to keep Table2 up to date without always having to copy everything from Table1? Basically from now on I would only like to copy new rows or modified
1
2218
by: Vivienne | last post by:
Hi there This is a hard problem that I have - I have only been using sql for a couple of weeks and have gone past my ability level quickly! The real tables are complex but I will post a simple and a real version with the hope someone can help me. Any help would be much appreciated - I would also be happy to pay someone to actually do it if it takes time to work out as I know that its hard when all your help is free :)...
0
8435
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
8345
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
8857
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...
0
8768
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 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...
1
8547
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
8633
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...
0
4181
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
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
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

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.