Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Design Forum > HTML / CSS
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-14-2006, 09:12 PM   #1 (permalink)
brotha bran
Junior Member
 
Join Date: Aug 2006
Posts: 2
Default horizontal alignment of images

i'm trying to align a number of images horizontally so they don't reach a point where they wrap. much like jeff allen's site (see jeffphoto dot net), but without the need to click on it to enlarge as he made them all one wide image. on another forum, i was given this advice:


CSS Code:

div.pics { width:100%; overflow:auto; height:500px /* tallest picture height */ padding:10px; }


HTML Code:

<div class="pics"><img ...><img ...><!--etc--></div>

And you just place all the images between the div tags. I am pretty sure you still can't have spacing in them. So you can add this too:
Code:

img { margin:0px 5px 0px 5px; }

And now they will place themselves apart automatically.


I did the CSS and have inserted the image tags into the html, but where do I put the last part about margins? In the CSS or html. Any help would be greatly appreciated, or if there's an easier way. thanks!
brotha bran is offline   Reply With Quote
Sponsored Links
Old 08-15-2006, 04:00 PM   #2 (permalink)
Broes
Junior Member
 
Join Date: Aug 2006
Posts: 7
Default Re: horizontal alignment of images

U just put it in the css, but then in the html you have to call the css-command for instance:

add the following line in css:
div.img { margin:0px 5px 0px 5px; }

and then in the html:
<div class="pics"><div class="img"><img ...></div><!--etc--></div>

suppose you could also enter spaces... not sure if that works though, have had a lot of trouble with that. Or use tables. Or use the "float" command (for more info w3schools.com)

Hope I helped you!
__________________
To become smarter, you must play someone smarter - Rule 1, Chess book 1878 (Revolver)
Broes is offline   Reply With Quote
Old 08-16-2006, 07:33 PM   #3 (permalink)
mohan37
Junior Member
 
Join Date: Aug 2006
Location: Champaign, IL
Posts: 4
Default Re: horizontal alignment of images

use tables dude. it's a much easier fix than trying to do some weird alignment stuff. <td>'s won't ever wrap, as far as I know, so you could have your pics extend 10000px off the screen if you wanted.

um, don't have them go that far though. haha.
mohan37 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 12:36 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums