Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

60 users online



CSS and text positioning (Relative)

CSS and text positioning (Relative)

Currently viewing this thread: 1 (0 members and 1 guests)


standbyme

standbyme

Neverside Newbie
Status: Offline!

CSS and text positioning (Relative)

Hello!
I must begin by saying I'm pretty new to CSS. I'm basically trying to learn it properly and perfectly and so far it's proving to be difficult, but i'll keep on trying.
So here's my problem. I want to put my text in the middle of this page: http://www.hole-in-a-cup.net/leblog/
Where the main box is. I also want a heading. I want them to be positioned relatively.
If you take a look at the css file ---> http://www.hole-in-a-cup.net/leblog/webstyle.css
Maybe you could help me figure out why the scrollbars are showing that there's more to scroll for to the right... it seems to show up only when I change the positioning to relative. Is there anyway to fix that? Or do I have to find another way to position my text?
Please help! If any clarifications are needed, do not hesitate to ask.
Thank you!
-Steph

___________________

http://www.hole-in-a-cup.net/leblog/siggy.jpg

Simon

Simon

Jag är Gandalf den grå och den vite, men vem är du?
Status: Offline!

Remove the "left: value;" parts and then wrap it all in a containing div. Then use this way or this way to center the containing div (which will center it's content.)

The scrollbar appears because you moved the <h1> and <p> tags to the left using "left: value;" without giving them a width. These tags are "full width" (without adjustments on them in the CSS) which causes a scrollbar when moved like that.

___________________

Neversidian, your staff is broken.

Last edited by Simon, May 13th, 2005 05:23 AM (Edited 1 times)

standbyme

standbyme

Neverside Newbie
Status: Offline!

i tried using a containing div... it didn't seem to work.
so i used the width to get rid of the scrollbars. but i can't seem to get the text that says "TEXT!" to wraparound, I tried it with the heading text and it worked but it doesn't work for the text. I decreased the width and it stays the same.
here's the CSS --->> http://www.hole-in-a-cup.net/leblog/webstyle.css
here's the index page --->> http://www.hole-in-a-cup.net/leblog/

Oh boy, this is getting confusing.
thanks for your reply btw.

___________________

http://www.hole-in-a-cup.net/leblog/siggy.jpg

Simon

Simon

Jag är Gandalf den grå och den vite, men vem är du?
Status: Offline!

The text doesn't wrap because it is all in one single line. Use Lorem Ipsum filler text instead and you will see that it works just fine in normal cases. (where the words are separated there and there that is)

___________________

Neversidian, your staff is broken.

burrito

burrito

' OR 1=1--
Status: Offline!

Also consider putting your slices in seperate divs and use realtive popsitioning for those too, asbolute positioning is bad!!!

___________________

Neverside Sucks.

Simon

Simon

Jag är Gandalf den grå och den vite, men vem är du?
Status: Offline!
Originally posted by burrito:

Also consider putting your slices in seperate divs and use realtive popsitioning for those too, asbolute positioning is bad!!!

Absolute positioning is not bad. In some cases, this for example, relative positioning is much better though.

Absoluter positioning, as a type of positioning on the other hand, is great. Absolute positioning have been my and others savior for countless times.
For example, many times your design and content order doesn't match up (navigation being above the site heading etc), this would be a lot harder to achive without this type of positioning. (look at the header of the very site you use right now)

___________________

Neversidian, your staff is broken.

Last edited by Simon, May 13th, 2005 05:29 PM (Edited 1 times)

standbyme

standbyme

Neverside Newbie
Status: Offline!

ahh! it worked! Thank you! Grin
As for the absolute positioning, I just do it as different divs and simply use relative positioning? Is that better?
I'll do that then Smile
thank you very much for your kind help.
-Steph

___________________

http://www.hole-in-a-cup.net/leblog/siggy.jpg

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.008 seconds.