Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / May 2005



Tip: Looking for answers? Try searching our database.

positioning: newbie question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
o@p.com - 26 May 2005 16:46 GMT
hi, i am making my first css website after reading about css on web last
night. i have run into a problem though.

i am using an external css file which includes:
p.maintext{
position:absolute;
left:100px;
top:200px;
}

in the document I am using:
<p class="maintext">This is a test</p>

The text is showing in the place it should be in the dreamweaver window but
not in my IE6 window.

Can you see any reason why?

thanks,
K
Spartanicus - 26 May 2005 17:38 GMT
>hi, i am making my first css website after reading about css on web last
>night. i have run into a problem though.
[quoted text clipped - 5 lines]
>top:200px;
>}

Ho, stop right there. You've made a classic css newbie error in thinking
that positioning is cool. Forget that there is such a thing as
positioning in css, it will get you behind in big trouble if you attempt
to use it without being adept with css.

Signature

Spartanicus

o@p.com - 26 May 2005 21:42 GMT
thanks..

the only reason I am learning CSS is because I have  been told off  by
people at  alt.html  for using tables for layout.

If I forget  there is such  thing as positiong in CSS is there another  way
I can layout my pages or do I go  back to tables?
Alan J. Flavell - 26 May 2005 21:56 GMT
> the only reason I am learning CSS is because I have  been told off  by
> people at  alt.html  for using tables for layout.

I'd suggest reading previous discussion on this topic, the folks here
get bored of repeating it every time.

> If I forget there is such thing as positiong in CSS is there another
> way I can layout my pages or do I go back to tables?

You can do much better than that, but IMO you need to let go of this
unproductive idea that you're merely going to convert a table-layout
site into a CSS equivalent.  Go back to first principles, mark up your
content with honest structure-related strict(-ish) markup, and then
work on the presentation proposals via CSS.  You can still end up with
a similar end result on the browsing situation you had in mind, but if
you do it properly it can be much more flexible and adapt itself
calmly to different browsing situations.

floating can be quite a lot more reliable than positioning.  As the
previous poster cautioned you, positioning isn't for a beginner, it
needs a lot of work to get it operating safely (and extra effort for
the operating system component that thinks it's a web browser).
o@p.com - 26 May 2005 22:06 GMT
right  so... i  am off to  read about 'float' in CSS

thanks.

ps. an answer to  my  query would still be  appreciated.
kchayka - 26 May 2005 22:13 GMT
> the only reason I am learning CSS is because I have  been told off  by
> people at  alt.html  for using tables for layout.

LOL
That's not surprising. You might be interested in knowing, however, that
many of the regulars in alt.html hang around here, too.

> If I forget  there is such  thing as positiong in CSS is there another  way
> I can layout my pages or do I go  back to tables?

The problem with using CSS for positioning is that if you don't really
understand how positioning and floats are supposed to work, the pros and
cons of each method, as well as the box model, you are in for a world of
frustration and failed attempts. Getting a handle on well-known browser
bugs is necessary, too.

Take some time to read the specs, take a tutorial, read a book, and get
some knowledge under your belt before you try to undertake making CSS
layouts yourself. In the meantime, go find some nice templates that
already have most of what you're looking for, such as:
<URL:http://css-discuss.incutio.com/?page=CssLayouts>
<URL:http://webhost.bridgew.edu/etribou/layouts/>
<URL:http://www.allmyfaqs.com/faq.pl?Tableless_layouts>

Whatever you do, keep in mind that you don't really have any control
over your layout, so abandon any thoughts you might have about a
pixel-perfect design. It ain't gonna happen, so don't waste your time.

HTH

Signature

Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.

Spartanicus - 27 May 2005 00:34 GMT
>thanks..

Please quote a bit of what you are responding to.

>the only reason I am learning CSS is because I have  been told off  by
>people at  alt.html  for using tables for layout.
>
>If I forget  there is such  thing as positiong in CSS is there another  way
>I can layout my pages or do I go  back to tables?

Replacing html tables used for layout with a css solution is one of the
more difficult tasks (the principle reason is IE's poor css support).
All techniques used to create IE compatible "css layouts" can cause
serious problems compared to a html table layout if not implemented
skillfully.

First learn how to use css for everything presentational apart from
using it to create a layout. Only when you've mastered css to a decent
degree should you attempt to create a css layout. Stick to using a html
table for layout until then.

Signature

Spartanicus

Big Bill - 27 May 2005 09:48 GMT
>thanks..
>
>the only reason I am learning CSS is because I have  been told off  by
>people at  alt.html  for using tables for layout.

Tell them they masturbate.
Oh wait!
They know!

>If I forget  there is such  thing as positiong in CSS is there another  way
>I can layout my pages or do I go  back to tables?

There's nothing wrong with tables. Just try not to nest too many of
them. Get them to validate and they'll be ok.

BB

--
www.kruse.co.uk/ seo@kruse.demon.co.uk
       seo that watches the river flow...
--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.