Login

Login

Need to register? Lost password?

Options

Advertisements

Advertisements

 

gawd, i hate html and css...-__-

WebDev

Minitokyo » Forum » Computers & Internet Fora » WebDev  gawd, i hate html and css...-__-

page 1 of 1

problem solved! thanks for all the help everyone!

Well...for centering a layout, it is best to use a table layout. Even though table layout are harder to code, it is very valid and the best to use. Most sites uses table because table has a centering code, while div layer does not.
This is my site: http://www.angelic-dream.net/index2.php
The layout is center because it's a table layout.

If you need help then tell me...^__^;;

i agree with chau-chan because the table setup is designed with the center justtification in my opinyon use the table layout although its harder to code

I usually put, say

<div id="header"
CONTENT
</div>

Then in CSS
div#header {
width: widthofheader;
margin: 0 auto 0 auto;
}

And that centers it.

Ah as chau-chan suggest, it is best to code it as a table layout.

<table align="center" id="Table_01" width="561" height="465" border="0" cellpadding="0" cellspacing="0">

That is what I use for one of my sites. Or you could simply have it as:
<table align="center">

And if you wish to have a footer, you could just the image at the very end of all your content. Or you could have this code:
<img src="IMAGE HERE" valign="bottom">

I'm not so sure if it's going to work, but you could try. :) If you have any questions, just let me know. ^^

edit: by the way, it looks fine with 1024x768 resolution. ^^

yeah, it'd probably be easier to put the images in a table and center the whole table, that way, the top and bottom images would actually stay together no matter what resolution you use, because for me with a widescreen res (1280 x 800), the top and bottom part of the images don't line up:
http://img224.imageshack.us/img224/8609/untitled2cy5.th.jpg

try this in the style content:

Code:

body{
margin : 0 auto;
text-align : center
}


This will center all the content of the body without using tables and it works for IE, Firefox, Opera and Safari (mac).
Tables are specifically implemented for DATA content not for style content.
Then, for the text-content use the SPAN tag instead of the DIV tag. The difference between the two tags is that the DIV are rendered as block content while the SPAN is an inline content that will not change the rest of the layout.

page 1 of 1

Only members can post replies, please register.