What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » CSS Question

CSS Question
Author: Message:
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
O.P. CSS Question
i want a box that is 700px wide and 500px high and centered, vertically and horizontally in the page. is this possible (without using tables) i want to strictly use Divs.

the vertical-align: attribute of css doesent work with divs.

any help is appreciated.
[Image: jeansiger5.jpg]
11-01-2005 11:12 AM
Profile PM Find Quote Report
Jhrono
Veteran Member
*****


Posts: 1791
Reputation: 25
33 / Male / Flag
Joined: Jun 2004
RE: CSS Question
div.box {
width:700px;
height:500px;
margin:0 auto;
}

and at the code
<br>
<br>
<div align="center" class="box">
blabla
</div>

and use breaks <br> to "center" it

not actually sure if that noob shit will work

i'm actually at w3schools trying to learn something about it..

This post was edited on 11-01-2005 at 02:29 PM by Jhrono.
11-01-2005 11:23 AM
Profile E-Mail PM Find Quote Report
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
Joined: Feb 2005
RE: CSS Question
quote:
Originally posted by Ash_
the vertical-align: attribute of css doesent work with divs.

It should and it does for me. Are you sure you have done it right. Did you test to see if your css is valid?

quote:
Originally posted by Johny
<br>

<br /> is the best way as it ends the tag.

11-01-2005 05:45 PM
Profile PM Find Quote Report
Kryptonate
Veteran Member
*****

Avatar

Posts: 2874
Reputation: 23
38 / Male / –
Joined: Jun 2003
RE: CSS Question
quote:
Originally posted by Johny

i'm actually at w3schools trying to learn something about it..
learn xHTML instead of regular HTML. xHTML is it's successor.
0 auto doesn't exist. Just give it a number and leave the auto.

The vertical align should work indeed.
11-01-2005 06:00 PM
Profile E-Mail PM Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: CSS Question
"CSS level 2 doesn't have a property for centering things vertically. There will probably be one in CSS level 3. But even in CSS2 you can center blocks vertically, by combining a few properties."
read more : http://www.w3.org/Style/Examples/007/center.html

Google has some good results:
http://www.google.co.uk/search?client=firefox-a&r...btnG=Google+Search

vertical-align will only work if its in a table and you are looking for pure css..

This post was edited on 11-01-2005 at 06:25 PM by hmaster.
[Image: sig.png]
11-01-2005 06:24 PM
Profile PM Web Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
O.P. RE: CSS Question
quote:
Originally posted by Johny
div.box {
width:700px;
height:500px;
margin:0 auto;
}

and at the code
<br>
<br>
<div align="center" class="box">
blabla
</div>

and use breaks <br> to "center" it

not actually sure if that noob shit will work

i'm actually at w3schools trying to learn something about it..

lol yeh, that's the easy part.

quote:
Originally posted by hmaster
"CSS level 2 doesn't have a property for centering things vertically. There will probably be one in CSS level 3. But even in CSS2 you can center blocks vertically, by combining a few properties."
read more : http://www.w3.org/Style/Examples/007/center.html

Google has some good results:
http://www.google.co.uk/search?client=firefox-a&r...btnG=Google+Search

vertical-align will only work if its in a table and you are looking for pure css..
hmm yeh i tried google but they all used tables or didnt work for me.
[Image: jeansiger5.jpg]
11-01-2005 09:07 PM
Profile PM Find Quote Report
lordy
Senior Member
****


Posts: 853
Reputation: 24
35 / Male / Flag
Joined: Jul 2004
Status: Away
RE: CSS Question
quote:
Originally posted by Absorbation


quote:
Originally posted by Johny
<br>

<br /> is the best way as it ends the tag.

<br /> is in XHTML, if you are using HTML then just use <br>

imo, use XHTML, it may be slightly harder (because you have to use CSS as well), but it makes for cleaner code
11-02-2005 06:22 AM
Profile E-Mail 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