Web Layout
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsWeb DesignWeb Layout

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 2nd, 2005, 07:12 PM
aspfree2000's Avatar
aspfree2000 aspfree2000 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 51 aspfree2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 13 m 34 sec
Reputation Power: 6
CSS v Tables....are you sure?

I'm a new convert to laying out sites using css instead of tables and I can see the reasons for doing so.
I am trying to use css in most of my new projects but one problem I have, and to me it is an insurmountable one, is that I can't design tight graphic layouts with css like I can with tables.

For instance, with tables I can make curvy lines go from a side bar, up through some menu bars and into a logo at the top of the page.
I can't see how I can do this using css layout: (Look at the line on the left that runs up the page)
example here

Also, I thought about converting one of my sites to css layout, but I just don't think it's possible.
Here is the url.example 2

Please don't get me wrong here, I am all for css but from what I can make out there's things that can't be done with it.

There are many knowledgable folks out there and I stress that I am extremely grateful for all the advice I receive on these forums, however, so many folks are saying css layout is the only way to go and are intimating that if we use tables we are dumbo's.

I would like someone to really honestly tell me if my above sites can or can't be built using css, without going into 'support mode' for style sheet layout.
Thanks guys.
Brian
__________________
Try to look unimportant. The enemy may be low on ammo.


Reply With Quote
  #2  
Old July 3rd, 2005, 06:58 AM
elijathegold's Avatar
elijathegold elijathegold is offline
Senior Fire Wizard
Click here for more information
 
Join Date: Feb 2005
Location: Ashford, Kent. England
Posts: 5,651 elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 2 Months 2 Weeks 2 Days 4 h 21 m 19 sec
Reputation Power: 301
To get a good idea of what can be achieved using css have a look at the CSS Zen Garden

It makes CSS converts out of many
Comments on this post
aspfree2000 agrees!
__________________
And he picked it all up... in his pick-up.





Friends of Shemzilla

Reply With Quote
  #3  
Old July 4th, 2005, 12:57 PM
aspfree2000's Avatar
aspfree2000 aspfree2000 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 51 aspfree2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 13 m 34 sec
Reputation Power: 6
Thank you very much for this.
It's basically answered my question.
Now getting my head around it is the next step.

Reply With Quote
  #4  
Old July 4th, 2005, 03:25 PM
aspfree2000's Avatar
aspfree2000 aspfree2000 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 51 aspfree2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 13 m 34 sec
Reputation Power: 6
Quote:
Originally Posted by elijathegold
To get a good idea of what can be achieved using css have a look at the CSS Zen Garden

It makes CSS converts out of many


I've been looking at this but there's one thing I really can't grasp..........Howto center everything on the page.

I can get an idea of what's basically going on and I seem to be able to figure the positioning of most objects but I simply can't see how the whole lot is centered.

The main 'table' (for want of a better word, sorry stays in the middle of the window regardless of what resolution your screen is.

Reply With Quote
  #5  
Old July 4th, 2005, 04:38 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 8
Quote:
Originally Posted by aspfree2000
I've been looking at this but there's one thing I really can't grasp..........Howto center everything on the page.

I can get an idea of what's basically going on and I seem to be able to figure the positioning of most objects but I simply can't see how the whole lot is centered.

The main 'table' (for want of a better word, sorry stays in the middle of the window regardless of what resolution your screen is.


the "vertical-align" property is only for inline elements positioned inside their parent line. There is a hack that uses this approach, but it only works when the container has a fixed height.

Consider a box that's 500px high:

Code:
<div id="box">
<p>Centered content</p>
</div>


Would be achieved using:

Code:
#box { 
height: 500px;
line-height: 500px; /* enables us to use "vertical-align" */
text-align: center; }
#box p {
vertical-align: middle;
}


There's also some tricks with absolute positioning as well, but that only works when the content has fixed height.

So basically:

Use the "line-height" method when the parent has fixed height but not the content.

Use the "negative-margin" method when the parent has varying height but the content has a fixed height.

If both are varying, then you're screwed

Well, not entirely.

In standards-compliant browsers, there's: "display: table-cell;" which makes everything work perfectly, but IE ignores it, so unless you're developing for an intranet using standards-compliant browsers then you're without hope really.

Reply With Quote
  #6  
Old July 5th, 2005, 03:10 AM
aspfree2000's Avatar
aspfree2000 aspfree2000 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 51 aspfree2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 13 m 34 sec
Reputation Power: 6
Phoenix, thanks very much for this. I really do appreciate it.

Reply With Quote
  #7  
Old July 5th, 2005, 01:12 PM
elijathegold's Avatar
elijathegold elijathegold is offline
Senior Fire Wizard
Click here for more information
 
Join Date: Feb 2005
Location: Ashford, Kent. England
Posts: 5,651 elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 2 Months 2 Weeks 2 Days 4 h 21 m 19 sec
Reputation Power: 301
Also if you are talking about centering everything horizontally you can set the text-align attribute on the body and use a fixed width container for your content

Code:
 <body>
   <div id="container">
 	...  Stuff in here  ...
   </div>
 </body>
 


And the CSS
Code:
 body { text-align: center; }
 #container { margin: 0 auto; width: 640px; }
 

Reply With Quote
  #8  
Old July 5th, 2005, 01:26 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 8
When using text-align, the centered content doesn't need a fixed width, but if you want the stuff inside it to be centered then just override it for the child:

Code:
 body { text-align: center; }
 #container { text-align: left; }
 
Comments on this post
aspfree2000 agrees!

Reply With Quote
  #9  
Old July 5th, 2005, 01:29 PM
elijathegold's Avatar
elijathegold elijathegold is offline
Senior Fire Wizard
Click here for more information
 
Join Date: Feb 2005
Location: Ashford, Kent. England
Posts: 5,651 elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)elijathegold User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1709224 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 2 Months 2 Weeks 2 Days 4 h 21 m 19 sec
Reputation Power: 301
DANGNABBIT! I'm still using too much code. That's what I get for listening to people !(on this forum)


Reply With Quote
  #10  
Old July 5th, 2005, 03:07 PM
aspfree2000's Avatar
aspfree2000 aspfree2000 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 51 aspfree2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 13 m 34 sec
Reputation Power: 6
Quote:
Originally Posted by Phoenix
When using text-align, the centered content doesn't need a fixed width, but if you want the stuff inside it to be centered then just override it for the child:

Code:
 body { text-align: center; }
 #container { text-align: left; }
 


OOPs, sorry, 'fraid that didn't work for me when I viewed it in me browser. (ie6) Everything stays to the left of the page

elijahthegold's code worked ok though.
(Centered container with text left-aligned)

Reply With Quote
  #11  
Old July 5th, 2005, 03:20 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 8
Oh wait... yeah, I just realised, since the #container element is a block element (that is, it "sort of" fills the line) the content will appear as if its left aligned.

So yeah, #container will need some form of width (but it can be anything)

Although my preferred choice for horizontal alignment of "page containers" is with this:

body { marign: 0 10% 0 10%; }

Which means it looks good at practically all screen-sizes, but it means that the content has a varying width.

Reply With Quote
Reply

Viewing: ASP Free ForumsWeb DesignWeb Layout > CSS v Tables....are you sure?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |