Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 5th, 2008, 07:33 AM
pradeepjain's Avatar
Familiar Sight
 
Join Date: Jul 2007
Location: India
Age: 24
Posts: 244
Default align images

I have 5 images of equal width which i have to place one below the another without any gap between them.how to do its ....what should be the css for the images or say div..i am doctype of strict ..



Thanks,
Pradeep
Reply
  #2  
Old September 5th, 2008, 08:13 AM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 636
Default

what about:
Expand|Select|Wrap|Line Numbers
  1. .yourimageclass {
  2.   display: block;
  3.   padding: 0;
  4.   margin: 0;
  5. }
Reply
  #3  
Old September 5th, 2008, 09:32 AM
pradeepjain's Avatar
Familiar Sight
 
Join Date: Jul 2007
Location: India
Age: 24
Posts: 244
Default

Quote:
Originally Posted by Dormilich
what about:
Expand|Select|Wrap|Line Numbers
  1. .yourimageclass {
  2.   display: block;
  3.   padding: 0;
  4.   margin: 0;
  5. }
hey its taking a small gap between each picture wht to do.....
Reply
  #4  
Old September 5th, 2008, 10:44 AM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 636
Default

Quote:
Originally Posted by pradeepjain
hey its taking a small gap between each picture wht to do.....
what brower do you use? is there any possibility that some other css rule overrides this? (the code worked for me as intended (FF 3.01/Mac))

regards
Reply
  #5  
Old September 5th, 2008, 11:43 AM
pradeepjain's Avatar
Familiar Sight
 
Join Date: Jul 2007
Location: India
Age: 24
Posts: 244
Default

Quote:
Originally Posted by Dormilich
what brower do you use? is there any possibility that some other css rule overrides this? (the code worked for me as intended (FF 3.01/Mac))

regards
how to override all the styles
Reply
  #6  
Old September 5th, 2008, 12:44 PM
David Laakso's Avatar
Expert
 
Join Date: Aug 2008
Location: US
Posts: 302
Default

Quote:
Originally Posted by pradeepjain
how to override all the styles
Put the page on a pubic server and provide a clickable link to it in your post (3rd request). It is difficult enough to fix what can be seen.
Reply
  #7  
Old September 5th, 2008, 12:46 PM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 636
Default

Quote:
Originally Posted by pradeepjain
how to override all the styles
first you have to get all the matching rules, though this may not be very easy (I recommend the Firebug plugin for Firefox for that, because this shows all styles an element has).

what browser do you use? (could be a bug, too)

regards
Reply
  #8  
Old September 6th, 2008, 02:43 PM
pradeepjain's Avatar
Familiar Sight
 
Join Date: Jul 2007
Location: India
Age: 24
Posts: 244
Default

I am giving the link to the site i am working on....

http://www.iiap.res.in/

as you can see the images on the left hand side of your screen..i want it to be in same way .i want to change it bcos there is some problem with the validation part...any way to do with the css....



thanks,
Pradeep
Reply
  #9  
Old September 6th, 2008, 05:02 PM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 636
Default Re: align images

Quote:
Originally Posted by pradeepjain
as you can see the images on the left hand side of your screen..i want it to be in same way .i want to change it bcos there is some problem with the validation part...any way to do with the css....
sorry, I don't understand. do you want the pictures align like those in the link? they're essentially doing the same as my css suggestion, though it is much deeper nested (for my liking, the site is nested too much anyway) and therefore the css is applying to a div rather than the img.
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles