Skip to content

More aligning center and right

April 12, 2013

If you are creating error message boxes in JQuery Mobile using your own custom pop up boxes, you may encounter issues like I did in terms of aligning the pop up box to the right of the screen. Instead of using the relative positioning, use absolute position and set the right to be right: 0px which places the box to the right of the screen, with the following attributes: –

position: absolute;
right: 0px;
margin-right: 10px;


<div id=’errorbox’ class=’ui-loader ui-overlay-noshadow ui-body-d close-button’>
    <a href=’#’ id=’errorbox-close-button’ onclick=’$(this).parent().hide();’ style=’font-size:10px; position:relative; float: right;’>Close</a>

This is an error message!

Replace position:relative and float: right as now width is set!


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: