Newbie (Easy Question) Centering div style position? |
Newbie (Easy Question) Centering div style position? |
Isathara |
May 4 2008, 03:17 PM
Post
#1
|
Group: Members Posts: 1 Joined: 4-May 08 Member No.: 5,578 |
I'm making a simple website for a friend, and all I'm doing is centering text on a backround image so it looks like it's actually coded properly. My image is centered, but the problem is that I need a fixed hight, width, and length for my div text box, but I don't know how to keep those three fixed while centering it in relation to 'left'.
Here's my coding, and I need the top, width, and height to stay as they are while centering 'left'. QUOTE <div style="position : absolute; top : 460px; left : 500px; width : 550px; height: 430px ;COLOR:white;FONT-FAMILY:arial; FONT-SIZE:8pt; background : transparent; overflow :auto;"> This is probably a very obvious question, but I need help nonetheless. How should I do it? |
pandy |
May 4 2008, 04:55 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
http://css-discuss.incutio.com/?page=CenteringBlockElement
Your absolute positioning will override most things you try to do though. Why position it 500px from the left if you want it centered? |
Darin McGrew |
May 5 2008, 01:44 AM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Also, don't use pt for font sizes. Use 100% for body text, use larger percentages for headings and the like, and use (slightly) smaller percentages for legalese and similar fine print.
|
Lo-Fi Version | Time is now: 4th May 2024 - 01:00 AM |