What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » centering <div> tags

centering <div> tags
Author: Message:
DJKAL
Senior Member
****

Avatar

Posts: 800
Reputation: 14
33 / Male / –
Joined: Oct 2005
O.P. centering <div> tags
hi, i need another bit of hjelp with the website im working on.
i have a links menu which is set to display the links using the <li> tags "inline" and the .div tag is set to be 750px with borders etc etc and that is all ok. but my question is how can i center this? i want to keep the text alignede to the left as i have it now but want the overall "box" to be in the middle of my page.
i tried using the <center></center> tags around it but that centered my text also so wwas not what i wanted. can anyone please help me?

thanks.

EDIT: just found out it does work (is centered) in internet explorer, but how can i get it to work in firefox also?

This post was edited on 05-24-2006 at 11:44 PM by DJKAL.
"You don't sleep, you defragment!"
05-24-2006 11:41 PM
Profile E-Mail PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
38 / Male / Flag
Joined: Aug 2004
Status: Away
RE: centering <div> tags
<div align="center">
<div id="your_current_div">blah</div>
</div>

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

05-25-2006 01:15 AM
Profile PM Find Quote Report
DJKAL
Senior Member
****

Avatar

Posts: 800
Reputation: 14
33 / Male / –
Joined: Oct 2005
O.P. RE: centering <div> tags
thanks thats perfect! :D
"You don't sleep, you defragment!"
05-25-2006 01:37 AM
Profile E-Mail PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: centering <div> tags
evil evil booneht.

<div style="margin: 0px auto;">
<div id="your_current_div" style="margin: 0px auto;">blah</div>
</div>
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
05-25-2006 01:49 AM
Profile PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
38 / Male / Flag
Joined: Aug 2004
Status: Away
RE: centering <div> tags
quote:
Originally posted by ShawnZ
evil evil booneht.

[same stuff I said, but differently]
That's something each person has to figure out by themselves. I won't provide the additional stuff if I don't know how he wants to do it.

I assume he knows how to modify it to his needs.



quote:
Originally posted by ShawnZ
what do you mean how he wants to do it? its the same thing, execpt mine is the "proper" way
It's the same thing, but without margins. Wow!

This post was edited on 05-25-2006 at 02:14 AM by L. Coyote.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

05-25-2006 02:04 AM
Profile PM Find Quote Report
DJKAL
Senior Member
****

Avatar

Posts: 800
Reputation: 14
33 / Male / –
Joined: Oct 2005
O.P. RE: centering <div> tags
quote:
Originally posted by booneht
I assume he knows how to modify it to his needs.


yer i do mostly. all i needed was to center my the <div> tags without affectng the text, the code you provided me with worked fine so that's all that matters - thanks a lot :)
"You don't sleep, you defragment!"
05-25-2006 02:06 AM
Profile E-Mail PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: centering <div> tags
quote:
Originally posted by booneht
quote:
Originally posted by ShawnZ
evil evil booneht.

[same stuff I said, but differently]
That's something each person has to figure out by themselves. I won't provide the additional stuff if I don't know how he wants to do it.

I assume he knows how to modify it to his needs.

what do you mean how he wants to do it? its the same thing, execpt mine is the "proper" way
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
05-25-2006 02:09 AM
Profile PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: centering <div> tags
quote:
Originally posted by ShawnZ
evil evil booneht.

<div style="margin: 0px auto;">
<div id="your_current_div" style="margin: 0px auto;">blah</div>
</div>

you dont need the px on 0 :P
05-25-2006 07:18 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On