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

using css float tag for different size images

35
hi and happy new year

I am using the css float tag to align all my images but some of the images are not the same width, I am using a liquid layout but am having trouble aligning them properly on the page, here are the css and html

div.float {float: left; width: 125px; padding: 10px; margin: 25px;}

<div class="float">
<a href="../images/times%20mag%20aug%202003%20big.png"><img src="../images/times mag aug 2003 small.png" alt="The Times mag Aug 2003" border="0"></img></a></div>

Some of the images are 458px wide, 321px wide and 179px wide

For the wider images the css is:

div.floatLarge {float: left; width: 125px; padding: 25px; margin: 95px;}

but then the vertical spacing in between the larger width images are quite big and I am not sure how to fix it.

Can anyone help?

thanks
Dec 31 '06 #1
5 3216
drhowarddrfine
7,435 Expert 4TB
Well, for the larger images you are making the margin 95px wide and for the smaller images the margin is smaller.
Jan 1 '07 #2
camphor
35
if I make the padding smaller than 25px or margin smaller than 80 px then the larger images will overlap, if you go to www.christinebec.com/About CB/selected_editorials.htm, I want the larger images spaced out evenly, please help as I am not sure how to solve this problem
Jan 8 '07 #3
drhowarddrfine
7,435 Expert 4TB
You can set the padding for the different sides like this:
div.floatLarge {float: left; width: 125px; padding: 0 25px 0 25px; margin: 95px;}
which reads as top, right, bottom, left for the padding.

Is that what you had in mind?
Jan 8 '07 #4
camphor
35
You can set the padding for the different sides like this:
div.floatLarge {float: left; width: 125px; padding: 0 25px 0 25px; margin: 95px;}
which reads as top, right, bottom, left for the padding.

Is that what you had in mind?

sort of but thanks very much for your help
Jan 11 '07 #5
AricC
1,892 Expert 1GB
sort of but thanks very much for your help
Have you fixed your issue?
Jan 11 '07 #6

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

Similar topics

2
by: Dr. Richard E. Hawkins | last post by:
I've googled around, and asked everyone I know, but I still can't find any reference to anyone else having faced this particular IE bug with floats. I've put a page at...
9
by: Henri Sivonen | last post by:
URL: http://hsivonen.iki.fi/france-2005/ On the page, markup looks like this: <p class="imgpara"><a href="..."><img src="..." alt="..." height="..." width="..."></a>Caption 1</p> <p...
13
by: Michele Guidolin | last post by:
Hello to everybody. I'm doing some benchmark about a red black Gauss Seidel algorithm with 2 dimensional grid of different size and type, I have some strange result when I change the computation...
4
by: John Swan | last post by:
Hello. I'm trying to create a simple program that amongst other things creates a thumbnail of an image (Bitmap) to a set size determined by the user in pixels? The problem is: All of the...
0
by: jonipony | last post by:
HELP: Float Left box is drifting to the right in ie! -------------------------- I need som HELP with my CSS coding! On the following web page my design falls apart at screen size 800 x 600...
9
panachepad
by: panachepad | last post by:
I arrived here from a websearch that found this thread from your archives: http://www.thescripts.com/forum/thread97805.html It helped me to understand that I am on the right track, but I still have...
5
by: woodced | last post by:
This is driving me a bit crazy now. I've got a page with 3 columns. However the 3 columns are divided up into horizontal rows. In the central column of hte horizontal row the content can be of...
4
by: erikirl | last post by:
http://www.hardwareforfree.com/ I'm trying to get the Consumer Gift Network image to be in the top right corner of the 800px area in the header. I have searched for hours and tried a lot of...
1
by: swetha123 | last post by:
hello, Can any one please tell me I am Using php,Mysql,CSS to build my site In my database i have small images and large images i am show the small images to the right of the main container...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...
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...

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.