Positioning is off |
Positioning is off |
![]()
Post
#1
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
I have been trying to do this layout all day and for the life of me I can't figure out what's wrong..
Everything is backwards. Where I want something to appear several pixels from the left it goes half way across the page but it works perfectly if i go from the right rather then the left. or I'm trying to position my news 160px from the top but it went to the bottom of my page. I set it to 0 and it still doesn't reach the top of my page. CODE <?php include('header.php'); ?> <div style="position:absolute;background-color:#ffffff; right: 342px; top:0px; width:494px;border= 1px solid #000000; overflow: auto; overflow-x: hidden;"> <div class="content"> <?PHP $number=5; $template="Lay1"; include("/home/trulysel/public_html/cutenews/show_news.php"); ?> <?php include('footer.php'); ?> thats the code. here's the site click here help? |
|
|
![]() |
![]()
Post
#2
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
yeah, no dice. lol
|
|
|
![]()
Post
#3
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
If you want to position things from the left, then use left:; and not right:;
Also, it should be border:; not border=; |
|
|
![]()
Post
#4
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
Yes, I understand that. What I'm saying though is that when I set it to go to the left a certain amount of pixels it goes half way across the page.
Look at this code. CODE <DIV style="position: absolute; top: 160; left: 900px; width: 294px;"> <DIV CLASS="content2"> elite affiliates </div> <br> <DIV style="position: absolute; top: 260; left: 0; width: 294px;"> <DIV CLASS="content2"> latest images </div> one is set to left: 900 and one is left: 0 but look at the website and they're in the same place to the left but they won't position correctly. It's backwards web site |
|
|
![]()
Post
#5
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
Ja okay see problems like this are what validating is for. Fix all the errors and then come back if you still have a problem.
|
|
|
![]()
Post
#6
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
yeah, i've already done that but i want to know WHY one positions correctly at 900px but the other one which is in the SAME spot only works at 0...any idea why?
|
|
|
![]()
Post
#7
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
Gee, I wonder if maybe your browser doesn't know which version of XHTML to parse the code in, and so there are conflicting codes...
![]() |
|
|
![]()
Post
#8
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
know what? i've never had this problem before and you don't have to be rude.
|
|
|
![]()
Post
#9
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
Sure sounded like it, but it could just be the fact that I've been trying to figure this out for hours and running on no sleep but who knows.
|
|
|
![]()
Post
#10
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
I wasn't trying to be rude, but seriously, go through and fix all the validation bugs and I swear to Bob you'll see a huge improvement in your code. I didn't put it out there TWICE just to be an ass, and people don't validate just for the hell of it. It finds your errors for you and tells you what to fix. Hell it even tells you how to fix it. Way simple.
|
|
|
![]()
Post
#11
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
Not hard as much as it is time consuming, granted i've spent just as much time trying to fix it already. :|
|
|
|
![]()
Post
#12
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
Take a break, grab some toast... Seriously, stop looking at the code for a while an then come back haha.
Most of what needs to be fixed is just a bunch of alt tags - skip those for now and just fix the other problems. After that, revalidate and all that should be left to do is the alt tags. Personally I only ever fill those with alt="rabble" or something stupid that I can copypasta to make the whole process take like 5 minutes. I think the biggest problem with you source is that you didn't specify a doctype so your browser probably defaulted to one that isn't going to parse correctly with some of the codes you have. Trust me, specifying a doctype is extremely important and can make, or in this case, break a layout. |
|
|
![]()
Post
#13
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
What doctype should I be using?
|
|
|
![]()
Post
#14
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
Personally I always shoot for XHTML 1.0 Strict but I think in your case you're better off with XHTML 1.0 Transitional, however this does cause the validator to see 275 errors 4 warnings...
![]() Also, just a question, why are you using inline styling? It slows down how fast people can access your site as compared to an external stylesheet. When the browser has to load the new CSS for each page instead of once from reference, older computers and dial-up practically asplode because they have to download the same exact CSS a million times. |
|
|
![]()
Post
#15
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
I have an external style sheet. this was an adopted site..im working with what I have.
|
|
|
![]()
Post
#16
|
|
![]() i like boobies, yes I do. I like boobies - how 'bout you? ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 620 Joined: Jun 2008 Member No: 662,457 ![]() |
Well in that case, why not just write up a new layout? Seems like a heck of a lot less effort, to be honest haha.
![]() |
|
|
![]()
Post
#17
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
i was hoping i wouldn't have to haha.
now that i have gone through and validated it...it still doesn't work. I'm still using negative values when I shouldn't be.
Reason for edit: Please use the Edit button instead of double-posting. - Mike
|
|
|
![]()
Post
#18
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Posts merged.
|
|
|
![]()
Post
#19
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 2,648 Joined: Apr 2008 Member No: 639,265 ![]() |
Gee, I wonder if maybe your browser doesn't know which version of XHTML to parse the code in, and so there are conflicting codes... ![]() If browsers have trouble parsing HTML/XHTML, they fall back to a non-strict parser, anyway. At any rate, unless you explicitly send a page marked up with XHTML as XHTML, it's parsed using an HTML parser anyway. |
|
|
![]()
Post
#20
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 79 Joined: Oct 2007 Member No: 583,422 ![]() |
Oh well, as it stands now my page only has 3 errors, it was validated and im still having all these positioning errors and what not. I had less errors before I validated it.
|
|
|
![]()
Post
#21
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 1,237 Joined: May 2008 Member No: 648,123 ![]() |
Validation doesn't make problems go away; it's a guideline to fix those problems. Besides, the errors that you have are serious ones, and they're the type that need to be fixed. To start with, you have a div, iframe, image, and a map in your header. That's a no-no. You've incorrectly closed the tags (using < /div> and < /head> instead of </div> and </head>). You have elements that are open, but are never closed, and you have elements outside the closing tag of the HTML page.
I wouldn't suggest validating your code; it's useless at this point. Instead, look at how HTML pages are structured. An overview of an HTML page: link A detailed explanation of what each required component of an HTML page means: link |
|
|
![]() ![]() |