Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alignment of image

Status
Not open for further replies.
A CSS question (forum215) not javascript.

images are inline elements so use text-align: center; on the parent element.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Without knowing what you have tried, its hard to say.

But Chris is right, this would be more HTML than JS.

Looking at the page, the images appear to be being set as backgrounds for the divs, so try background-position:center center; on the div.

However, your DIVs are really wide. Wider than your view-able area, so you may need to work to fix that too. There's no reason the divs need to be 1280px wide.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top