CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 21st, 2004, 02:16 AM
fuzzybunny's Avatar
fuzzybunny fuzzybunny is offline
C Neophyte.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Melbourne Australia
Posts: 332 fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 12 h 15 m 3 sec
Reputation Power: 14
Unhappy Stuck on DIV inside a DIV

I'm setting up a website order form, and using CSS for formatting.

I want to be able to put a picture icon (to view a picture of the product) beside the products details. I'm having problems because the product details keep wrapping to a new line. Here are some images illustrating the predicament:

What it currently looks like

Picture 1


What I want it to look like

Picture 2


Structure of the DIV boxes

Picture 3



The code for the boxes is here:
Code:
<A href="http://localhost/21072004/picture.php?id=t35064">
<SPAN class=kitTitle>t35064. Kampfpanzer Leopard </SPAN></A>

<DIV style="position: relative; WIDTH: 500px; HEIGHT: 100px">
	<IMG src="hobbyhq - tamiya_com_au - Browse_files/camera.jpeg" style=\"position: absolute; margin: 0px 0px 0px 0px;\">

	<DIV style="position: relative;LEFT: 45px; WIDTH: 400px; TOP: 0px; HEIGHT: 40px; BACKGROUND-COLOR: #f0f0f0">

	<TABLE class=dataFile border=0>
		<FORM name=module action=cart.php?action=confirm method=post>
 		<TBODY>
  		<TR class=listColor>
    		<TH>1:35</TH>
    		<TH class=listHighlight>AFV</TH>
    		<TH>AU$30.00</TH>
    		<TH align=right>QTY
				<INPUT type=textField size=3 value=1 name=qty> 
				<INPUT type=submit size=3 value="Add to Cart" name=submit> 
				<INPUT type=hidden size=3 value=t35064 name=id>
			</TH>
		</TR>
	</TBODY>
	</FORM>
	</TABLE>


	</DIV>



I also took the liberty of putting a sample capture page on my webspace (if anyone wishes to investigate further)

Sample Page

Page Stylesheet



I'm trying to use a "DIV within a DIV", but when I set the positioning to "absolute", the DIV warps to the top of the page!


I've been stumped for days on this, and it's delayed the page's launch.

If anyone can help me... it'd be very much appreciated.

Reply With Quote
  #2  
Old July 21st, 2004, 03:54 AM
woody2k woody2k is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 8 woody2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try somthings like this..

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html>
<
head>
<
title>Shop</title>
<
style type="text/css">
padding:0font-size12px;}

#hele {
margin:0
padding:5px
border-style:solid
border-width:1px
WIDTH500px
HEIGHT100px
}

#image {
margin-right:3px
float:left;
}

#hoved {
margin:0
float:left
BACKGROUND-COLOR#f0f0f0; 
padding:5px
width:400px;
}

div.box {
margin-left:3px
padding:5px
float:left;
HEIGHT35px;
background-color#BBBBFB;
}
</
style>
</
head>
<
body>

<
p>
<
A href="http://localhost/21072004/picture.php?id=t35064">
t35064Kampfpanzer Leopard</A></p>

<
DIV id="hele">

<
DIV id="image">
<
IMG src="hobbyhq - tamiya_com_au - Browse_files/camera.jpeg" alt="image">
</
div>

<
DIV id="hoved">
<
FORM name=module action="cart.php?action=confirm" method=post>
<
div class="box"><p>1:35</p></div>
<
div class="box"><p>AFV</p></div>
<
div class="box"><p>AU$30.00</p></div>
<
div class="box"><p>QTY
<INPUT size=3 value=1 name=qty
<
INPUT type=submit size=3 value="Add to Cart" name=submit
<
INPUT type=hidden size=3 value=t35064 name=id></p></div>
</
FORM>
</
div>
<
div style="margin:0; clear:left;"></div>
</
div>

</
body>
</
html

Last edited by woody2k : July 22nd, 2004 at 02:00 PM. Reason: Update!

Reply With Quote
  #3  
Old July 21st, 2004, 08:02 PM
fuzzybunny's Avatar
fuzzybunny fuzzybunny is offline
C Neophyte.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Melbourne Australia
Posts: 332 fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level)fuzzybunny User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 12 h 15 m 3 sec
Reputation Power: 14
It works great Love the little border, much cleaner!

problem is... IE6 doesn't like it

Before anyone says "IE6 if for gimps", does anyone have a workaround?

IE6 DIV look

Opera DIV look

Reply With Quote
  #4  
Old July 22nd, 2004, 11:02 AM
woody2k woody2k is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 8 woody2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hmm.. it works in my iE..

i can take a look at it..

Image

Reply With Quote
  #5  
Old July 22nd, 2004, 11:18 AM
woody2k woody2k is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 8 woody2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try the script now..
I have put a "<div style="margin:0; clear:left;"></div>" in the script.. i think it works better now..

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Stuck on DIV inside a DIV


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT