473,383 Members | 1,879 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,383 software developers and data experts.

Pictures and captions in html

I know how to put a caption under a picture using TABLE or the DIV but what happens is each picture is below the other and I want the pictures to be side by side with a few spaces in between. How do I do this. Thanks
Jul 31 '11 #1
5 1881
ilya Kraft
134 100+
This should give you 2 images in row with space of 20px between each other

Expand|Select|Wrap|Line Numbers
  1. <div id="imgwrap" style="width:500px; margin-left:auto; margin-right:auto;">
  2.    <div id="image1" style="width:240px; float:left;"><!-- image here --></div>
  3.    <div id="image2" style="width:240px; float:right;"><!-- image here --></div>
  4. </div>
  5.  
What I did is I made a div with width of 500px and aligned it in the middle of the page, then inside that div I made 2 other ones and floated one right and left each of those div's is 240px so 480px together and as the father div imgwrap is 500px you would have 20px in the middle between 2 pictures. if you do reaserch on float option for styling, you will understand how to position divs.
Jul 31 '11 #2
That worked with both pictures on the left side wioth a space between them, but I could not figure how to do the captions with them thne. I have about 4 pictures I want to go across and be able to put captions underneath them. Thanks
Jul 31 '11 #3
Rabbit
12,516 Expert Mod 8TB
You could have a div container that's floated and in the container, have an image and div for a caption.
Aug 1 '11 #4
Rabbit Can you give me an example please.... Thanks
Aug 2 '11 #5
Rabbit
12,516 Expert Mod 8TB
Give it a try and post here with your attempt and any questions.
Aug 2 '11 #6

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

Similar topics

2
by: Joost van Beek | last post by:
Hi, I am able to create images with the use of the GDLIB. but I am not able to use these images together with HTML. I always get the message "headers are already sent. Can anyone give me an...
4
by: CB US 77 | last post by:
I use a piece of javascript to create a photo gallery slideshow. The slideshow part works great, but I would like to add captions to each picture. If you want to see the html, send me an email to...
3
by: David | last post by:
Hi, I need a button shown for each record (cont. form) with specific captions on each. I have a notes form for each record. When a user presses the button they can read the notes. I want to...
0
by: dragan | last post by:
I want to display HTML file as an embedded resource, (read it into MS webBrowser control.) I also have pictures in HTML file. My problem is that I dont want users to be able to copy text in...
5
by: | last post by:
I nearly always use HTML in notepad, but I'm looking for a solution to what I think will be a common problem. I want to add a caption to photos that have been scanned in to make a single picture....
2
by: harambeegirl | last post by:
I have read the CSS tutorial at W3Schools.com. It states that the caption-side property is not supported in IE6. If I want to add captions to my images, what else can I do?
1
by: Samuel | last post by:
I would like to rotate pictures in HTML file Is that possible and how Thank you, Samuel
8
by: Samuel Shulman | last post by:
Is it possible and how to rotate pictures in HTML document Thank you, Samuel
1
anfetienne
by: anfetienne | last post by:
i have this code below that i made....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger...
1
by: Yzarine | last post by:
Hello, my full question is, is there a command that changes the image in a html "window" every time I open it?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.