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

3 images and a div

PJ
My challenge is to have the header of my page have 3 images...one in the top
left, one in the top right ( always aligned to the right side of the
browser ) and one image in the middle that repeats or stretches according to
the width of the browser window.

I've accomplished this using a table and inline styles on the cells with the
following ugly markup:

<!-- TOP TABLE START -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td
style="background-image:url('/site/images/div0/layout/topleft.jpg');backgrou
nd-repeat:no-repeat;width:633px;height:89px"><img
src="{0}images/layout/spacer.gif" alt="" /></td>
<td
style="background-image:url('/site/images/div0/layout/top.jpg');background-r
epeat:repeat-x">&nbsp;</td>
<td
style="background-image:url('/site/images/div0/layout/topright.jpg');backgro
und-repeat:no-repeat;width:188px;"><img src="/site/images/layout/spacer.gif"
alt="" /></td></tr></table>
<!-- TOP TABLE END -->

As I transition to xhtml, I am trying to use one div tag with external
styles and accomplish the same thing, but I am having difficulty. This is
the closest I have gotten.

<div id="test"><img src="topleft.jpg" alt=""/><span
id="test2">&nbsp;</span></div>

body {
margin:0px;
}
#test {
width:100%;
background-image:url(topright.jpg);
background-position:top right;
background-repeat:no-repeat;
}
#test2 {
border:1px solid red;
background-image:url(top.jpg);
background-repeat:x-repeat;
}

I would like the top.jpg image to "fill the gap" as the window width is
changed, but this current markup and styling fails to display the middle
image at all. How do I remedy this? TIA~PJ
Jul 20 '05 #1
5 2711
In post <_a********************@speakeasy.net>
PJ said...
My challenge is to have the header of my page have 3 images...one in the top
left, one in the top right ( always aligned to the right side of the
browser ) and one image in the middle that repeats or stretches according to
the width of the browser window.


http://usenet.alt-html.org/three-image-thingy.html
--
brucie.
10/October/2003 08:47:27 am
Jul 20 '05 #2
PJ
excellent! now, how can i prevent 1 and 3 from stacking on top of each when
the window is narrow enough?

"brucie" <br*******@alt-html.org> wrote in message
news:1x***************@alt-html.org...
In post <_a********************@speakeasy.net>
PJ said...
My challenge is to have the header of my page have 3 images...one in the top left, one in the top right ( always aligned to the right side of the
browser ) and one image in the middle that repeats or stretches according to the width of the browser window.


http://usenet.alt-html.org/three-image-thingy.html
--
brucie.
10/October/2003 08:47:27 am

Jul 20 '05 #3
In post <gt********************@speakeasy.net>
PJ said...
My challenge is to have the header of my page have 3 images...one in the top
left, one in the top right ( always aligned to the right side of the
browser ) and one image in the middle that repeats or stretches according
to the width of the browser window.
http://usenet.alt-html.org/three-image-thingy.html
excellent! now, how can i prevent 1 and 3 from stacking on top of each when
the window is narrow enough?


stick min-width:??? on the #container. (not supported by IE)

please don't toppost
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post

--
brucie.
10/October/2003 09:17:21 am
Jul 20 '05 #4
PJ
Setting the height of the container and overflow: hidden seems to have
worked. Is this the best approach?

Thx again! ~PJ

"brucie" <br*******@alt-html.org> wrote in message
news:1x***************@alt-html.org...
In post <_a********************@speakeasy.net>
PJ said...
My challenge is to have the header of my page have 3 images...one in the top left, one in the top right ( always aligned to the right side of the
browser ) and one image in the middle that repeats or stretches according to the width of the browser window.


http://usenet.alt-html.org/three-image-thingy.html
--
brucie.
10/October/2003 08:47:27 am

Jul 20 '05 #5
PJ wrote:
Is this the best approach?
Please read brucie's post. Here's the relevant part again.

brucie wrote:
please don't toppost
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post


--
Brian
follow the directions in my address to email me

Jul 20 '05 #6

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

Similar topics

7
by: Wayne | last post by:
I have a script that uses filesystemobject that reads files from a given path, in my case images. It is running on a server that is 2000 adv svr w/ all current patches. The script prior to some...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
10
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....
6
by: wattanabi | last post by:
Greetings, I'm attempting to layout a bunch of images in a grid using DIV's instead of a table. I currently have a 3x6 table that I need to convert to css. I've seen various example of a 3 to 4...
2
by: mouseit101 | last post by:
Hi, I'm writing a script that would (hopefully) search google images for whatever, and then return a list of URLs for the image. Right now I have: $dom = new DomDocument(); $url =...
0
by: Frenchie | last post by:
Hi, I have created a very neet menu from an example found on the MSDN library at: http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitembinding.imageurlfield.aspx My...
1
by: Cerebral Believer | last post by:
Hi folks, I am using the following code for mouse over (roll-overs) in my XHTML code. <a onmouseover="document.getElementById('sitemap').src = '../images/buttons/sitemap_mo.jpg';"...
4
toxicpaint
by: toxicpaint | last post by:
Hi, can anyone give me a hand. I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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.