Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: not2easy
I have a 300 x 200 div floated in my page, nested a few div's thick. The div is for username/password to log-into my site. It is typical layout....
 remember me login
Based on research I've seen various opinion's on ways to do this, including:
- <p> tags per row
- <div> tags per row
- absolute positioning
So far I have not seen arguments to support any opinions, just (usually strong, sometimes negative) opinions. I want to ask... is absolute positioning bad? If so, why?
I should mention, I still haven't quite gotten an epiphany with CSS/html as to how you structure your page (getting there, but not quite yet) so bear with me if this is too remedial.
It is just a matter of how they style their sites.
I prefer to use a fixed width with floats within. Just my preference.
If you are just starting out with css, You could do many searches within WebmasterWorld to get information. I'm sure if you searched absolute positioning, you will find a few discussions in regards to it. Also check out WebmasterWorld's library, it is filled with information.
And, of course, don't' forget to Google things that you might have questions about.
I like to use other tags than <div>, I consider an overuse of <div> just as bad as using <table> for layout.
I prefer the html to make sense without the CSS.
Absolute positioning, relative positioning, just go with the flow, use margins and padding, or floats: they all have their place and all can be used to achieve something, which you choose is bottom line your choice. It's hard to label one better than the other. Use the right tool for the task at hand.
I have a 300 x 200 div floated in my page.....
I think the largest opposition to absolute positioning is inherent in your question - it nearly always goes hand in hand with pixel sizing of elements and text (although you can position absolutely without pixel sizing . . . )
When you specify an element by pixel size, you're likely to also specify the text by pixel size, which can produce unexpected results with varying monitor resolutions - an 11px type size will reduce to infinity on a high rez monitor.
Second, it's most likely related to accessibility. A good rule of thumb is to design/develop so that the layout will either adapt or degrade gracefully for any user environment or browser. Someone should be able to increase/decrease text size, use their own style sheets or at least set background colors without your layout falling apart. Absolute positioning and pixel-perfect assignments tend to fall apart when you apply these environment changes.