PDA

View Full Version : Got a problem with positioning



Razzo187
Dec 9th, 2008, 04:03 PM
Hello there,

I recently started on this project http://www.d31459.monline.dk/

I've worked out the positions on all my divs. Heres my problem. as you can see the page FORSIDE displays a video and so the div with the video is bigger than those on the other pages. The right elements shifts. I can imagine its because i use positioning wrong?

How can i change this so the right elements always stay the same place even if I resize the window. Also I use the same code on all my links. Can I get it done so I only have to post the code once and not in all?

Further more if i want the container div and its backgroundcolor to expand as the content expands, how di I do it?

Thanks in advance :)

twodayslate
Dec 9th, 2008, 10:05 PM
validate your page.

frogbot
Dec 9th, 2008, 10:19 PM
I'd start with validating your page :) (http://local.genieknows.com)

Razzo187
Dec 10th, 2008, 02:00 AM
ofc im sorry :D

Razzo187
Dec 10th, 2008, 04:34 PM
The site is validated now except the index.html. I have 13 errors all about the embeded video and i cant seem to fix them. rest of the sites are clear of errors :)

Excavator
Dec 10th, 2008, 06:35 PM
Hello Razzo187,
It looks like your media, <object id="mediaplayer" border="0" width="435" height="320" is being placed in #forsnyhed which is 438px wide with margin: 0 0 0 10px;

I think all that is just wider than your left column? Or at least the media is wider than #forsnyhed.
See box model described here. (http://www.w3.org/TR/CSS2/box.html)

Really, I think you'd do better to get rid of all that positioning and use floats.