473,569 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using css float tag for different size images

35 New Member
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%20a ug%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 3233
drhowarddrfine
7,435 Recognized Expert Expert
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 New Member
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.christinebe c.com/About CB/selected_editor ials.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 Recognized Expert Expert
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 New Member
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 Recognized Expert Top Contributor
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
5701
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 http://dochawk.org/sample.html . This was made by stripping out the google ads from the regular pages. It validates as strict 4.01 at http://validator.w3.org. (The google...
9
2958
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 class="imgpara"><a href="..."><img src="..."
13
2700
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 from double to float. Here are the time of test with different grid SIZE and type: SIZE 128 256 512
4
2553
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 examples I have seen so far are in c#. Can anyone please provide reference to a c++ managed version. Thanks. John
0
2043
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 (looks fine at larger screen sizes) when the left menu box that should float left is drifting to the right in Internet Explorer 6.0 (it doesn't...
9
5082
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 one problem surrounding this issue. I am trying to make a <div> block that contains a) a link b) an arrow or an image of an arrow c) another link...
5
1535
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 variable size, but greater than a minimum size. The columns to the left and right of this centre column contain shadow images and so the div height needs to...
4
3744
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 different things but it's still not working for me. I'm not very experienced so I'm sure it's something simple that I'm missing. Please look at the code...
1
2496
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 now i need to show the large image to left side when user clicks on these small images but when i click on the images it is showing the large image...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.