| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) | |
|
Registered User
Join Date: Aug 2007
Location: West Midlands, UK
Posts: 80
|
Can you spot the mistake
Hi, Just throwing together a html quick and dirty mockup with inline styles. I have 3 divs welpic, weltxt and subscribe. These are nested inside another div. I am trying to get the weltxt and welpic to float left and subscribe to float right. My eyes are bleeding and I don't know what I have missed. I've done this 100 times before and I think the red mist is preventing me sorting this out. Any help appreciated. Thanks Here is the code Quote:
Last edited by mpdennis : 18-09-2007 at 10:23. |
|
|
|
|
|
|
#3 (permalink) | |
|
Registered User
Join Date: Aug 2007
Location: West Midlands, UK
Posts: 80
|
Quote:
Nope. Tried anyway and didn't work. Besides, It's floating up to the right of weltxt but not welpic. Maybe the divs are placed wrong, Thanks for suggestion though |
|
|
|
|
#5 (permalink) |
|
I speaks reel Englis!
Join Date: Sep 2007
Location: Earth. I Think....?
Posts: 2
|
Have u tried using the position element? for the ones on the left, just enter left: 5px (or whatever u want) top: 5px (as above) and flip it for the one on the right... right: 600px (again, change to whatever) Is a rather crude method, but it might work. Then again, it might not lol. My brain aint exactly with it at the moment. |
|
|
|
#7 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,339
|
You could indent your code so we can tell what's the child of what. So you want it to show up - | welpic | weltxt | subscribe | - right? Since that's also the source order, just float them all left. Then you have to deal with your width math: #welpic: 460px + 10px (left margin) + 10px (right margin) + 20px (left padding) + 20px (right padding) = 520px #weltxt: 460px + 10px (left margin) + 10px (right margin) + 20px (left padding) + 20px (right padding) = 520px #subscribe: 200px + 10px (left margin) + 10px (right margin) + 20px (left padding) + 20px (right padding) = 260px Total: 520px + 520px + 260px = 1300px #page (and therefore #mid_content) = 780px width. 1300px > 780px. Even if you removed all margins and padding and #subscribe, #welpic and #weltxt would STILL amount to 920px, which is also greater than 780px. |
|
|
|
#8 (permalink) |
|
Registered User
Join Date: Aug 2007
Location: West Midlands, UK
Posts: 80
|
pgo, I'm trying to place welpic over wel txt and float subscribe to the right. It also seems to view OK in IE7 ? but not firefox, funny thing is, my dev browser is firefox lol Maybe I try again tomoz. |
|
|
|
#10 (permalink) | |
|
Senior Member
Join Date: Jan 2005
Posts: 12,339
|
Quote:
|
|
|
![]() |
|