Jump to content

How would i?


unidox

Recommended Posts

as long as the background is centered, the test will be centered too.

put the text in a div and use <div style='position:absolute; left:*px

and just allign it as you wish. * is the number of pixels the div will be away from the left.

Link to comment
Share on other sites

You DON'T want the margin move 12px you want 12px of padding. Margin makes the whole box move ... no the contents.

 

Try padding:15px.

 

Also, avoid using "position:absolute" at all costs unless you really know what you are doing.

 

Unless your container with the background image is designated as "position:relative", your text as "position:absolute" takes it out of the flow of html altogether. (which would by default move it to the top left of the browser's window).

Link to comment
Share on other sites

i would surround your text (granted its inline) with span tags

 

<span class="whatever">TEXT</span>

 

.whatever {

margin-left:-12px;

}

 

 

 

also, try having your background image in the

 

body {background-image:URL(ahashshA);}

 

and have all other div tags in a wrapper.. then your background should not move.. unless the background is strictly for the div tag.. then use spans

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.