navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

_position or position?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> _position or position?
Page: [1]
 
FlowerPower

 

Posts: 67
Joined: 4/27/2004
Status: offline

 
_position or position? - 7/13/2005 2:49:56   
I found some css code online and have adapted it to a site I am constructing, and it all seems to work fine. However, it contains the following lines, which I am a bit unsure about:

_position: relative;
_top: -50%;


Is there a difference between _position and position?
Thanks!
Tailslide

 

Posts: 6046
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: online

 
RE: _position or position? - 7/13/2005 3:46:09   
the correct syntax would be postion:relative;

Not sure where the _position would have come from...

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to FlowerPower)
FlowerPower

 

Posts: 67
Joined: 4/27/2004
Status: offline

 
RE: _position or position? - 7/13/2005 7:27:07   
Sorry, I found it in the stylesheet for http://www.jakpsatweb.cz/css/priklady/vertical-align-final-solution-en.html, which explains a way to achieve vertical centering using css. I thought it looked strange, and when I removed the underscore it did make a difference but I couldn't quite figure out what was going on.

Thanks for the help!

By the way, if anyone knows of a simpler/better/more elegant way to achieve the vertical centering in css, I would love to know. I'm relatively new to css - that is, I can read the code and figure out most of it, but have trouble constructing it all, and designing the hierarchy (the cascading part).

(in reply to Tailslide)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: _position or position? - 7/13/2005 9:27:50   
Hi, I did a google on vertical centering for you and found out that the underscore is a hack.
http://wellstyled.com/css-underscore-hack.html

If you do a google on css vertical centering, it will bring up some links for you that have some examples, and I am sure you could view source and modify their code.

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to FlowerPower)
FlowerPower

 

Posts: 67
Joined: 4/27/2004
Status: offline

 
RE: _position or position? - 7/13/2005 11:20:53   
Thank you very much. I will experiment. I was a bit confused by the triple nesting of divs, but I'll tinker and see if I can make some sense of it.

(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: _position or position? - 7/13/2005 11:49:55   
quote:

I was a bit confused by the triple nesting of divs,


Just a note to help you out here, when you do the divs, make sure you comment their opening and closing. ANd it needs to be done a certain way, or it will cause bugs within IE.
<div id="container"><!--open container div-->
your content goes in here.......
<!--close container div--></div>


Make sure that when you comment the closing div, that your comment is on the inside of the closing div.

This makes searching your code much easier, plus it helps you to find the divs when you need to either mess with the code while playing or when you are designing a page, it helps with finding it to change content.

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to FlowerPower)
FlowerPower

 

Posts: 67
Joined: 4/27/2004
Status: offline

 
RE: _position or position? - 7/13/2005 12:04:11   
Thanks for the very useful hints. In this case, though, the problem is not so much keeping track of what I've done, but understanding what I've done in the first place.

I'm unsure why there were three layers of nested divs to center the text (in the the code on the page I mentioned above): in the page I'm working on, I want a navigation bar bang smack in the middle of the page, extending the full width of the page and always staying vertically centered. I have got it to work fine using a modified version of the code I found, and have tested it in Firefox and IE and it works well. But I may very well have created very ugly code and made it unnecessarily complicated.

Anyway, I guess that's part of the learning process. Thanks for your patient replies!

(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: _position or position? - 7/13/2005 12:20:55   
quote:

I'm unsure why there were three layers of nested divs to center the text

Ok, one reason why it is good to comment your code. it would make it easier to understand their layout.

Nested divs help with your layout. A container div (sometimes called a wrapper div) will do just that, contain things, and make your design easier to do, and get to work in different browsers. A container is great for floats, just make sure you use a clearing method in the container div. A good article to look up is the Aslett clearning method.

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to FlowerPower)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> _position or position?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts