473,473 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to position divs Next To Each Other

Hi there,

My goal is to have a div background image be the border of two product photos rather than having the borders added to the photos. First off, sorry for my lack of experience with css and basic questions:)

The reference link is here: http://www.productscoop.com/weber-go-anywhere-gas-grill/

If you scroll down to the two gas grill product photos you will see that there is too much space between the DIVs. There should be just 10 or so pixels between the two product photos.

The question is: How can I lessen the space between the two DIVs? Thanks for your help!

Here's the code for the two images:

Expand|Select|Wrap|Line Numbers
  1. <div class="bottomproductleft"><img class="aligncenterphoto" src="/images/go-anywhere-grill.jpg" alt="Picture of best go anywhere grill review." width="284" height="284" /></div>
  2. <div class="bottomproductright"><img class="aligncenterphoto" src="/images/weber-go-anywhere.jpg" alt="Picture of weber go anywhere." width="284" height="284" /></div>
Here's the css code that controls the images attributes:

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. .bottomproductleft {
  4.     float:left;
  5.     margin-bottom: 15px;
  6.         background-image:url('bottomphotobg.png');
  7.         background-repeat:no-repeat;
  8.  
  9. }
  10.  
  11. .bottomproductright {
  12.     float:right;
  13.         margin-bottom: 15px;
  14.         background-image:url('bottomphotobg.png');
  15.         background-repeat:no-repeat;     
  16.  
  17. }
  18.  
  19. .post img.aligncenterphoto {
  20.     margin: 8px 8px 8px 8px; 
  21. }
  22.  
  23.  
Nov 12 '10 #1
1 4577
JKing
1,206 Recognized Expert Top Contributor
Float them both to the left.
Nov 12 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Oddball | last post by:
I have a problem with the positioning of two divisions. They are containined within a content division in which all the page content happens (ie not the menus, etc.). The behavior I would like...
8
by: Floris van Haaster | last post by:
Hi All! I have a question, i have a web application and I store some member information in a variable i declared in a module like: Public some_info_variable as string in module1.vb But...
0
by: friendlycoder | last post by:
Hi there, How do you align DIVS next to each other? I have 3 images, each image is assocated in the style sheet as background image. I want the images to align to each other like this...
9
by: Cas | last post by:
Hi, I create two textboxes and two labels. My problem is that: i want to get them under each other instead of beside each other. My second problem is that i want to have more spaces between the...
2
by: =?iso-8859-1?B?Sm/jbyBNb3JhaXM=?= | last post by:
Hi there guys, My doubt is related to PHP and MySQL usage, and it's related to check if performed queries are performed with success, since we know that: Each time we perform an sql query,...
2
by: jc | last post by:
RE:Two gridviews next to each other without a TABLE? In another post I can't seem to find somebody suggested I use use <divwith style=float:right to place two divs next to each other and this...
1
dlite922
by: dlite922 | last post by:
On my home computer, when I have many program open, If i open something like firefox all the firefoxes are next to each other, NOT grouped. They just open next to each other. Anyone know...
10
by: removeps-groups | last post by:
How to display table and select next to each other? <html> <body> <table border=1 style="display:inline-table"> <tr><td>Hello1</td></tr> <tr><td>Hello2</td></tr> <tr><td>Hello3</td></tr>...
0
by: removeps-groups | last post by:
Now I'm wondering how to display 3 elements next to each other. I came up with the following solution using float:left, but would like opinions if this is the right way to go. The idea is to...
7
by: ismailc | last post by:
Hi, I have a textbox and a button next to each other but i would like to decrease the space between them - so that they like part of one another <input type="text"> <input...
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
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...

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.