Need HTML content centred in browser

Status
Not open for further replies.

lafours

Power Member
Joined
Sep 15, 2008
Messages
599
Reaction score
351
I have some HTML content I need centring regardless of screen resolution. Not with <center> tags as that will centre the text format too. I need all the div's centred. Easy $5 paypal for someone. Skype LafoursBHW.
 
You should just be able to add

Code:
margin: [COLOR=#800000]0[/COLOR] [COLOR=#00008B]auto[/COLOR];

to the container elements css.

If you have any troubles pm me and ill take a look free of charge.
 
As long as you body has a width say 960px
as above just add margin: auto; to the css of the wrap container (container that holds all the information)

if you dont know what your looking for hit me up or the guy above
and well help.

No money needed for these things but if your feeling generous there was a thread earlier
about a guy down on his luck, maybe a $5 donation to his paypal acct would be great.
Just a thought
 
Depending on how your content is positioned, you could also use...

Code:
[COLOR=#40e0d0]margin-left[/COLOR]: auto;
[COLOR=#40e0d0]margin-right[/COLOR]: auto;

This way, you can set a specific top &/or bottom margin for your content if you need to..
 
You should just be able to add

Code:
margin: [COLOR=#800000]0[/COLOR] [COLOR=#00008B]auto[/COLOR];

to the container elements css.

If you have any troubles pm me and ill take a look free of charge.


Exactly that... So for an example if you're positioning an image, your code would be like this:

Code:
#myImage {
background-image: url("link");
background-repeat: no-repeat;
width: 379px;
height: 400px;
margin: 0 auto;
}

Now depending on where you adding your content you should always have an wrapper, like other people mentioned.

For example:
Code:
#wrapper {
width: 850px;
height: 600px;
position: relative;
margin: 0 auto;
}

Well thats pretty much it... add div id's in your html doc and enjoy. Added you into skype, in case you havent found anyone yet.
 
Wow! Only on BHW would you offer cash and get free help :) Thanks guys, I'll give it a go this afternoon and get in touch if I fail... Thanks again, can't believe the generosity of this place.
 
Thanks for all your help. This is now resolved with the help of the legendary geomuss.
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top