473,473 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to pad an image??

I have an image tag which i am putting out in a repeater. The repeater
itemtemplate is basically:

<itemtemplate>
<a href=abc>
<img src=xyz>
</a>
</itemtemplate>

I cannot seem to get my images to have any vertical padding. Ive tried
adding both of the following:

style="padding-bottom: 10px;"
vspace="5px"
style="margin-bottom: 10px;"

Nothing seems to work. my images keep winding up (after wrapping) with the
bottom of one row
right on top of the top of the next row. I need to put some space in
between, but the browser
doesnt seem to want to.

Thanks in advance,
- Arthur Dent.
Nov 19 '05 #1
8 2774
Put it in a div and apply styles to the div. Or use tables. Hard to say what
is better without seeing what you have on the page.

Eliyahu

"Arthur Dent" <hi*********************@yahoo.com> wrote in message
news:ew**************@TK2MSFTNGP09.phx.gbl...
I have an image tag which i am putting out in a repeater. The repeater
itemtemplate is basically:

<itemtemplate>
<a href=abc>
<img src=xyz>
</a>
</itemtemplate>

I cannot seem to get my images to have any vertical padding. Ive tried
adding both of the following:

style="padding-bottom: 10px;"
vspace="5px"
style="margin-bottom: 10px;"

Nothing seems to work. my images keep winding up (after wrapping) with the
bottom of one row
right on top of the top of the next row. I need to put some space in
between, but the browser
doesnt seem to want to.

Thanks in advance,
- Arthur Dent.

Nov 19 '05 #2
Problem with divs is that i need the images to all be on one line until they
fill it, then wrap.
Divs always want to wrap, which would put each image on a new line.

I thought about tables, but trying to do tables in a repeater is so
cumbersome. I had hoped id
be able to simply pad the images. I mean, the docs all say that you can, ...
i guess its just
another case of "We dont care what the doc says, well do what we want"?
Nov 19 '05 #3

"Arthur Dent" <hi*********************@yahoo.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Problem with divs is that i need the images to all be on one line until
they fill it, then wrap.
Divs always want to wrap, which would put each image on a new line.

I thought about tables, but trying to do tables in a repeater is so
cumbersome. I had hoped id
be able to simply pad the images. I mean, the docs all say that you can,
... i guess its just
another case of "We dont care what the doc says, well do what we want"?


1.) Use SPAN's (they don't wrap unless told to).
2.) Set the display style on the div so it doesn't wrap :)

HTH,
Mythran

Nov 19 '05 #4
> I thought about tables, but trying to do tables in a repeater is so
cumbersome.


Easy.

<table>
<asp:repeater>
<itemtemplate>
<tr>
<td style="set your style here"><a href=abc><img src=xyz></a>
</td>
</tr>
</itemtemplate>
</asp:repeater>
</table/

Eliyahu
Nov 19 '05 #5
On Mon, 27 Jun 2005 10:59:24 -0400, Arthur Dent wrote:
Problem with divs is that i need the images to all be on one line until they
fill it, then wrap.
Divs always want to wrap, which would put each image on a new line.

I thought about tables, but trying to do tables in a repeater is so
cumbersome. I had hoped id
be able to simply pad the images. I mean, the docs all say that you can, ...
i guess its just
another case of "We dont care what the doc says, well do what we want"?

See if 'float' helps.

Tony
--
http://www.dotnet-hosting.com
Free web hosting with ASP.NET & SQL Server
No ads - Innovative features
Nov 19 '05 #6
problem with that is that then i need to plan ahead how many images per
line, and then do a whole mess of conditional processing on the
separatoritemtemplate to close the the tr tags after x# of images go buy,
and keep a counter for each image incremented, modding to determine row
lengths. etc. not that its hard, its just a LOT of very tedious code.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:u9*************@TK2MSFTNGP10.phx.gbl...
I thought about tables, but trying to do tables in a repeater is so
cumbersome.


Easy.

<table>
<asp:repeater>
<itemtemplate>
<tr>
<td style="set your style here"><a href=abc><img src=xyz></a>
</td>
</tr>
</itemtemplate>
</asp:repeater>
</table/

Eliyahu

Nov 19 '05 #7
I tried wrapping them in spans already, also tried wrapping in a label tag.
Also tried adding the padding/margins to the A tag.

How do i set a div to not page-break? I tried style="page-break-after: ;
page-break-before: ;"
but that didnt work. The doc says an empty-string for these settings turns
it off, but apparently
it does not.

Imagine each letter X is an image, i need to do something like the diagram
below, where the number
of images across the page is determined by how wide the images are:
X X X X X X

X X X X X

X X X X X X X

X X X X X X
"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...

"Arthur Dent" <hi*********************@yahoo.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Problem with divs is that i need the images to all be on one line until
they fill it, then wrap.
Divs always want to wrap, which would put each image on a new line.

I thought about tables, but trying to do tables in a repeater is so
cumbersome. I had hoped id
be able to simply pad the images. I mean, the docs all say that you can,
... i guess its just
another case of "We dont care what the doc says, well do what we want"?


1.) Use SPAN's (they don't wrap unless told to).
2.) Set the display style on the div so it doesn't wrap :)

HTH,
Mythran

Nov 19 '05 #8
Ah, THANK YOU!. Adding the float style to the img tag, and moving all my
padding on to the img also did exactly what i needed.

Thanks Very Much!
"Tony Bukres" <to**@dotnet-hosting.moc> wrote in message
news:7j*****************************@40tude.net...
On Mon, 27 Jun 2005 10:59:24 -0400, Arthur Dent wrote:
Problem with divs is that i need the images to all be on one line until
they
fill it, then wrap.
Divs always want to wrap, which would put each image on a new line.

I thought about tables, but trying to do tables in a repeater is so
cumbersome. I had hoped id
be able to simply pad the images. I mean, the docs all say that you can,
...
i guess its just
another case of "We dont care what the doc says, well do what we want"?

See if 'float' helps.

Tony
--
http://www.dotnet-hosting.com
Free web hosting with ASP.NET & SQL Server
No ads - Innovative features

Nov 19 '05 #9

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

Similar topics

9
by: Pierre Tremblay | last post by:
Hi! I am trying to display an image in my html document. The document contains the following line: <td class="Input"><img...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
8
by: Jef Driesen | last post by:
I'm implementing some image processing algorithms in C++. I created a class called 'image' (see declaration below), that will take care of the memory allocations and some basic (mathematical)...
6
by: QuasiChameleon | last post by:
Hi, I'm trying to create a grayscale image class that reads and writes grayscale Targa format. This works well with smaller images, but corrupts larger images and creates a "Segmentation fault...
15
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
6
by: comp.lang.php | last post by:
/** * Generate the random security image * * @access public * @param $willUseFilePath (default false) boolean to determine if you will be using a file path * @param mixed $filePath (optional)...
1
by: bharathv6 | last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk PIL supports the use of...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
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
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...
1
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
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,...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.