Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Beginners jQuery/CSS Question

Featured Replies

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

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 :)

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 :D

Edited by teodora

  • 2 weeks later...

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.