January 17, 201511 yr Hello I am very slowly making progress in learning and testing out some jQuery. My page is here and my question relates to the overlay box on http://www.jameswinfield.co.uk/Emma.html# I have two questions - how can I centre the image that displays? Also how do I change the "Continue" and "Change Rating" buttons at the bottom? I cannot even find them!! Apologies for such dumb questions. James
January 18, 201511 yr To center the image, you can add the good old display:block, margin:0 auto to your CSS: #dialog img{ display:block; margin:0 auto; } If you plan to add more images and you don't want them centered, you can add id to the image, e.g. <img id="my-image".../> : #my-image{ display:block; margin:0 auto; } The simplest way would be just to center the text of the parent container. #dialog{ text-align:center; } This however will center all images and text in the #dialog div. The buttons: You can change them from your eventscript.js file http://www.jameswinfield.co.uk/eventsscript.js Hope that helps
January 19, 201511 yr Don't use IDs in Css Why not, if he wants to target this particular image only and no other image? Got you, not fully awake yet Edited January 19, 201511 yr by teodora
January 19, 201511 yr @@teodora and anybody else who might want a definitive reason not to use ID's in CSS read this article, it's a very good read-- http://csswizardry.com/2011/09/when-using-ids-can-be-a-pain-in-the-class/ Edited January 19, 201511 yr by rbrtsmith
February 3, 201511 yr Hi James Winfield I put some link here i hope this site will be helpful for your query Read this:- http://www.w3schools.com/jquery/ http://www.tutorialspoint.com/jquery/ http://learn.jquery.com/ Hire Shopify eCommerce Developer and Designer for you online Store
Create an account or sign in to comment