Topic: Why are a lot of sites jusitified left? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24630" title="Pages that link to Topic: Why are a lot of sites jusitified left? (Page 1 of 1)" rel="nofollow" >Topic: Why are a lot of sites jusitified left? <span class="small">(Page 1 of 1)</span>\

 
kelownarealtor
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jan 2005

posted posted 01-08-2005 21:23

Hi there! I'm learning XHTML, and it actually seems not too bad, however - I was wondering 2 things. Firstly I understand W3c desires for unified/verified code, and streamlining... but I was wondering:

I am recreating a web site in XHTML, and I have managed to get my 3 columns, however, the positioning is absolute. My main site is: link removed* (the old version google seems to hate)

My new attempt (still ratty) is here for my home page
link removed*

How can I use .css to get a 640 pixel wide 3 columns site that floats in the middle. I don't need anyone to recode the whole thing, just need a basic explanation of what technique to utilize.

Editor: nice site, easy on the eyes!

Edit by Skaarjj: *all links in this post were removed at the request of the author

(Edited by Skaarjj on 01-14-2005 02:11)

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-09-2005 04:06

Well, to answer the question in the thread title, there are various reasons that a lot of sites are justified left. Often it is because the designer doesn't know any better (for example, they build a fixed-width design and then simply let it fall where it may--which is on the left by default).

As for how to build a 3-column site 640 pixels wide that floats in the middle:

The easiest way to get the 640px width is to slap the whole thing in a "container" div with width: 640px. Then you can center that div and the three columns will be centered.

There are tons of sites and techniques dealing with both the centering issue and three column layouts. Everyone has their favorites, but I would recommend starting with Google and working your way through the resources to get an idea of how it's done: CSS centering and CSS 3 column layout.

Give it a shot and then post back here if you have any questions. Good luck!

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup | "Hooray for linguistic idiots and yak milk!"

(Edited by Suho1004 on 01-09-2005 04:06)

kelownarealtor
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jan 2005

posted posted 01-11-2005 11:22

Thanks suho!

I'm getting a bit closer to what I'm after, messed around with a bit. If i create a document/site that is XHTML 1.1 validated, how big of an audience am I cutting off? Would it be better to leave it in tables and make it 4.1 Transitional? It's a realty site so the odd person might be on a version 5 browser (at oldest I think?)

Thanks

I X I
Paranoid (IV) Inmate

From: beyond the gray sky
Insane since: Apr 2004

posted posted 01-11-2005 11:45

I'm not so sure you'd really be "cutting anyone off" - my website is done with CSS and HTML 4.1 transitional, has basically the same layout you're looking for, validates and - best of all - does not use tables

click the guitar to have a look and feel free to check out the css (/black.css)



Some people say I'm a dreamer, but I'm not the only one (John Lennon)

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-11-2005 14:06

Glad to be of service.

I agree with I X I. You will definitely not be cutting anyone off. There is no longer any reason to use tables for layout. I would definitely recommend you go with valid CSS/XHTML layout.

Now, whether you go with transitional or strict is up to you. My site validates as strict because I happen to be stickler for those sorts of things, but transitional is perfectly acceptable if you are just learning the ropes.

Drop us a link when you make some progress.

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup | "Hooray for linguistic idiots and yak milk!"

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 01-11-2005 18:21

IMO, there's no good reason not to go strict.

As far as cutting anyone off goes - you're more likely to have problems if your site is coded with tabled layouts and semantically poor, poorly formed code than you will using properly standardized code that is semantically correct.

At worst, you hide your stylesheet from older (v.4x) browsers, and they get a fully functional, though not as pretty. version of the site. IE 5 might have the occasional margin anomaly...

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-12-2005 02:00

I would have to agree that, personally, I feel that there is no reason not to go strict. But I also think that transitional is there for a reason... to be a transition from non-compliant to strict. As long as that's the attitude taken toward transitional, I think that's OK. I do not think it's OK to look at transitional as a permanent solution, because ultimately you will be training yourself to use deprecated techniques, etc. Transitional is a midway point in weaning yourself off of non-compliant code, not an endpoint.

If you feel confident enough to go straight to strict (and, honestly, it's not really that hard), then I would recommend it.

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup | "Hooray for linguistic idiots and yak milk!"

kelownarealtor
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jan 2005

posted posted 01-12-2005 11:04

I cam close to getting the site in strict, but I ran into some problems. I managed to upgrade to XHTML 1.0 Transitional, and get validated though, so at least now I've upgraded.

See, got my Button!

link removed*

I started a strict version, but I ran into some troubles getting the layout. I managed to figure out a 3 column layout, but couldn't confine it to 700 pixel width. what im trying to do here is have a centered, 700 pixel wide site. I want the top row to be 700x23, a second element that is 700x87 (a total header of 110 px height).
I was hoping the top little strip would be "background" and could have text over it. The second panel could just house the image.

Images:
image removed*


image removed*

For the content I was hoping for three regions, leftmost being at left 0, right most edge ending at 700.
I tried the below code but got some very gross results. I'm looking for this sort of thing:

image removed*


This is what I tried: (with no luck... link removed* )
Any help would be appreciated! thanks in advance.
I must say this stuff IS cool!

my current css:


code:
html, body {
margin: 0px;
padding: 0px;
background-color: #000000;
}
#toppanel {
position: absolute;
top: 0px;
bottom: 23px;
left: 0px;
width: 700px;
background-image: url(link removed*);

}
#topsecondpanel {
position: absolute;
top: 23px;
bottom: 110px;
left: 0px;
width: 700px;
background-image: url(link removed*);

}


#leftpanel {
position: absolute;
top: 112px;
height: 1600px;
left: 0;
width: 150px;
background-color: #1D1E54;
border:2px solid #D0C691;
}

#rightpanel {
position: absolute;
top: 112px;
height: 1600px;
right: 0px;
width: 120px;
background-color: #FFFFFF;
border:2px solid #C7C092;

}

#content {
position: absolute;
top: 112px;
height: 1600px;
padding-left: 160px; /* 20px to play with */
padding-right: 130px; /* 20px to play with */
background-color: #000000;
border: 0px;
}



(Edited by kelownarealtor on 01-12-2005 11:05)

(Edited by kelownarealtor on 01-12-2005 11:15)

Edit by Skaarjj: *all links and images in this post were removed at the request of the author

(Edited by Skaarjj on 01-14-2005 02:18)

I X I
Paranoid (IV) Inmate

From: beyond the gray sky
Insane since: Apr 2004

posted posted 01-12-2005 13:15

unfortunately this code does not center in IE < 5.5 (I think...) but it does work in the newer versions of IE and I know it works best in FF b/c that's what I test in. This is coming pretty much straight from my stylesheet, so you will need to fix the div IDs and widths.

code:
//this is where you will put the whole page width (700px in your case)
//the margin: auto; is what centers the page
#frame {
width: 640px;
margin: auto;
text-align: left;
background-color: #000000;
border: 2px solid;
}

#banner {
width: 640px;
margin: auto;
padding-top: 5px;
text-align: center;
background-color: #000000;
}

#navigation {
width: 125px;
font-weight: bold;
float: left;
text-align: left;
background-color: #000000;
}

#content {
width: 410px;
float: left;
background-color: #000000;
padding: 5px;
}

#links {
width: 95px;
float: right;
text-align: center;
padding-top: 10px;
background-color: #000000;
}

#clear {
height: 30px;
width: 640px;
padding-top: 10px;
clear: both;
text-align: center;
background-color: #000000;
border-top: 3px solid;
}


there is more discussion of the clear div layout and color

the HTML would look something like this

code:
<body>
<div id="frame">
<div id="banner">
...the rest of your divs, floated or positioned as you'd like
</div>
</div>
</body>



if you need some 1-on-1 I can be contacted via the AIM SN: IXIfx
I might not be the best, but I'm really working on it and I can try to explain it to you as best I can.

hope this helps,



Of all the things I've lost, I miss my mind the most (Ozzy Osbourne)
[edit]fixing ubb[/edit]

(Edited by I X I on 01-12-2005 13:19)

kelownarealtor
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jan 2005

posted posted 01-12-2005 23:07

hey thanks!

I applied some of your logic. It seems certain things render better in IE6, and other aspects better in netscape navigator. hmm Now I see why nobody goes strict LOL its time hasn't come, cause theres no consistency, maybe.

Heres the page so far:

link removed*

It's actually best viewed in IE6, things are pretty darn close. I like how NN7 doesnt allocate any extra sizing for my modified <h1> (for SEO), where as IE^ leaves an ugly strip through my banner. Opera butchers it in it's own unique way as well! How lovely. I'm not going to even bother looking at it with Firefox - i think the Boss is a lil tired of me trying to be a trendsetter here. It seems the web ain't ready for Strict, that much has become apparent. That is, unless everyone wants to go back to school book page looking reports - or companies don't mind their sites looking like Sh*! to some peoples browsers - yea right. Optimization for search engines is crucial for our site, and Tables rule for that. Nested or not, they can be manipulated to push your main content to the top (as viewed by Lynx for example) - where as with this CSS, I don't get the same results. I wonder if it matters at all which elements you declare, first, and if that would help.


Short and long of it is though, good 'ol HTML with tables does a sweeter job, hands down I guess its Transitional for now, with TABLES until the standards level out.

Thanks for your help!
Back to the Basics

(Edited by kelownarealtor on 01-12-2005 23:14)

Edit by Skaarjj: *all links in this post were removed at the request of the author

(Edited by Skaarjj on 01-14-2005 02:19)

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-13-2005 03:56
quote:
kelownarealtor said:

Now I see why nobody goes strict LOL its time hasn't come, cause theres no
consistency, maybe.



Who exactly is nobody? I only code in strict, and I know DL only codes in strict. Most people here probably code in strict. It may be difficult to get a handle on it at first, and I will admit that you wil need to employ a few hacks if you want to do certain things, but pure CSS is the way to go.

quote:
kelownarealtor said:

Short and long of it is though, good 'ol HTML with tables does a sweeter job,
hands down



It would be more accurate to say that you are more comfortable with table-based layout at the moment, and thus you can make it look better with table than with pure CSS. As far as the actual tools go, though, pure CSS is the better than tables in every respect. Think of it as the difference between a hacksaw and a radial table saw. If you do not know how to operate the radial table saw, you are liable to cut off your arm or launch a piece of wood through your chest. Naturally, you will feel more comfortable using a simple hacksaw, and at that point in time the hacksaw will do a better job than the radial table saw in your hands. This does not mean you should scrap the radial table saw and use a hacksaw for the rest of your life, though. Once you learn how to use the radial table saw, you will be able to accomplish tasks far more efficiently than with the hacksaw.

Right now, you're still a bit gun shy around the radial table saw because it has sliced your beautiful design into ugly pieces. I will not lie to you and tell you that standards compliance is perfect in all browsers--it's not. But the best and brightest minds in the business are well aware that the radial table saw--CSS--is the way to go, and there are many resources out there to deal with most (if not all of) the snags you will run into.

You've managed to put together a valid transitional page, and that is something to be proud of. As I said above, though, transitional is not an end point, it is a mid-way point. That is why they call it "transitional"--because it represents a checkpoint on the road from non-compliant design to compliant design. It would be a shame if you stopped here.

quote:
kelownarealtor said:

I guess its Transitional for now, with TABLES until the standards level out.



You're going to have to wait quite a while for the "standards to level out." In fact, given what we've seen so far in browser development, I doubt we will ever have a fully compliant browser. Standards will always be advancing and the browsers will always be one step behind. But that doesn't mean the bulk of the standards are not supported. The problem you are having right now is not due to lack of support for standards, but to your lack of experience with CSS. It is natural to be frustrated. But to attempt to shirk responsibility and place the blame on "standards" is irresponsible.

There is no need to be disheartened. I would encourage you to continue to work toward a strict solution even as you implement your transitional solution. Take it one step at a time and familiarize yourself with the techniques and invariable workarounds. What you want to do can be accomplished in strict, and one of the CSS wizards here could probably create a mock-up for you, but the best way to learn is by getting your hands dirty. I don't have the time to really dig through your code at the moment (having spent far too long writing this post), but I will give it a look later on and see if I can't make some suggestions. In the meantime, keep moving forward. Don't stop now--you're only halfway there.

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup | "Hooray for linguistic idiots and yak milk!"

kelownarealtor
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2005

posted posted 01-13-2005 22:15

help


help

the search engines found this page and looks like my status is HURTING, i may even been banned.
Guess it thought those posts were Doorway pages!!!!!

help

help

please delete all posts with URLS to my server on this thread!!
I had no idea this could happen!


acK

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 01-14-2005 02:26

OK, OK... calm down... it's taken care of.


Justice 4 Pat Richard

I X I
Paranoid (IV) Inmate

From: beyond the gray sky
Insane since: Apr 2004

posted posted 01-14-2005 08:26

it's been said time and time again, the search engines (google especially) like the asylum

(post 420! - not an official milestone, but I'll take it )



Some people say I'm a dreamer, but I'm not the only one (John Lennon)

Nathus
Bipolar (III) Inmate

From: Minnesota
Insane since: Aug 2003

posted posted 01-14-2005 19:38

Here is a good link on how to put the main body content first in a 3 column layout using CSS.

Source Ordered Columns from Position is Everything



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu