Jump to content

How would i?


unidox

Recommended Posts

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
https://forums.phpfreaks.com/topic/97803-how-would-i/#findComment-500622
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
https://forums.phpfreaks.com/topic/97803-how-would-i/#findComment-507174
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.