| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Bah @ text positioning | |
|---|---|
| Tweet Topic Started: Mar 20 2005, 07:28 PM (625 Views) | |
| Zach | Mar 20 2005, 07:28 PM Post #1 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I'm making a site with CSS ad div's just to clean up my knowledge of it. I'm encountering a problem with font positioning in my divs. http://ascii.dbqphost.com See content? It should be right at the top of the black area. Same thing with navigation, it should be at the top of it's div. Any thoughts? my CSS: http://ascii.dbqphost.com/css.css |
![]() |
|
| FearKiller | Mar 20 2005, 07:36 PM Post #2 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
In your CSS there is 120px of padding at the top of both these DIVs. Try messing with that and see what happens. If that doesn't work then I'll play around with it. |
![]() |
|
| Zach | Mar 20 2005, 07:49 PM Post #3 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Thanks it solved that problem. I'll figure out everytihng else. I seriously can't believe i missed that in my CSS! |
![]() |
|
| SkItZo | Mar 20 2005, 09:21 PM Post #4 |
|
Support Volunteer
![]() ![]() ![]() ![]() ![]()
|
Haven't looked at your css file nor will you probably find this useful, but you can also position something using this: <div style="float: left;">content</div> |
![]() |
|
| Zach | Mar 20 2005, 10:24 PM Post #5 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Already got it covered in my CSS.
|
![]() |
|
| Zach | Mar 22 2005, 05:52 PM Post #6 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Bleh, I don't like double posting...:'( Now I'm having a problem with footer placement. No matter what page you view it's always at the very bottom, right when you look at it, and it doesn't move with the bottom of the content div. Does anyone have suggestions as to how I could fix this? http://ascii.dbqphost.com/wishgame.php scroll down a bit, see how the footer stays on top of the text, and is stuck there? How would I fix that? |
![]() |
|
| Gornakle | Mar 22 2005, 06:15 PM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Remove the things crossed out and add the things in red. Haven't fully tested it, but it should work.
|
![]() |
|
| Zach | Mar 22 2005, 06:17 PM Post #8 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Alright, I'll try those out now.
|
![]() |
|
| Ben | Mar 22 2005, 06:17 PM Post #9 |
|
Quantum-locked when observed.
![]()
|
Get rid of the absolute positioning on your navi, content, and footer divs. Use floats instead. ![]() This should be the code for the three divs now.
You might want to experiment with the width of the #content box, but it needs a width declared for it float along side #navi. It might be easier to change the width of #navi from 175px to a percentage measure, but I'll leave that up to you. ![]() Tested in the cool real-time CSS editor of Firefox's Web Developer extension. ![]() Edit: Whoops, too slow. And Gornakle's actually makes a little more sense, since he's using a margin . . .
|
![]() |
|
| Gornakle | Mar 22 2005, 06:21 PM Post #10 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Whoa.. talk about coincidence. ![]() We posted (about) the same solution, with two minutes apart in posting, using the same extension. |
![]() |
|
| Zach | Mar 22 2005, 06:23 PM Post #11 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Alright, I tried it out, looks great. It now always goes to the bottom of the #content div. One more quick question, it's mainly for design aspect, but for pages that have less content than what would fill up the page, the #footer goes to the base of the #content div, no matter what. is there a way to specify it so that it'll always be at the very bottom, 100% of the time? </CSS-noob> |
![]() |
|
| FearKiller | Mar 22 2005, 06:25 PM Post #12 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
It's because when you position something abslutely and give it the "bottom: 1px" property, it displays the element 1 pixel from the bottom of the browser window, not the bottom of the page. You can either add a negative value to the "bottom" property and through trial and error you'll get it to where you want it, but it will most likely not be the same in all browsers and resolutions, so I wouldn't recommend doing it that way. I encourage you to get away from positioning DIVs absolutely and take advantage of the "float" property and if you have the need to position something I recommend you use relative positioning rather than absolute positioning. Relative positioning moves something from where it should be rather than absolute positioning which completely ignores where the element should have been. EDIT: wow this post was very late :wacko: |
![]() |
|
| 0 users reading this topic | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
5:37 AM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)



Already got it covered in my CSS.


5:37 AM Jul 11