Webmaster Forum

Advertise Here   Keyword Research Tool   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 09-14-2007, 01:48 AM   #1 (permalink)
Contributing Member
 
Fruit & Veg's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 370
iTrader: 2 / 100%
Fruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really nice
Unhappy CSS Relative Positioning Difference Between IE and FF

I'm starting to put together a site and I'm trying to overlay the logo on top of the design. The logo is awkwardly overhanging both the header and the main body elements, so I need to overlay the image.

Here's the test page so far - http://www.thebrandsurgery.co.uk/testsite/ - it's fine in FF2 but it's about 10px down in IE7.

I've tried searching for hacks and answers but nothing is working. How can I get this image to appear correct in both browsers?

Here's the CSS I'm using:

Quote:
html, body {margin:10px; padding:0; font: 76% arial,sans-serif; text-align:center;}

p {margin:0 10px 10px;}
a {display:block; color: #006; padding:10px;}

hr {border:0; width: 100%; color: #ec0c8c; background-color: #ec0c8c; height: 1px;}

div#container {text-align:left; width:700px; margin:0 auto; padding:0;}

div#header {float:right; width:660px; padding-top:80px; padding-bottom:3px; border-bottom: 3px

solid #ec0c8c;}

div#pinkbar {width:650px; float:right; background:#ec0c8c; padding:5px; margin:0;

color:#ffffff; text-align:right; font: 14px arial bold;}

div#logo {position: relative; top:-356px; left:70px; margin:0; padding:0;}

div#content {float:right; width:660px;}

div#navigation {background:#B9CAFF; float:left; width:40px;}

div#extra {background:#FF8539; float:right; width:660px;}

div#footer {background:#ffffff; float:right; width:660px;}
Maybe there's a better approach for acheiving this? Let me know
__________________
Individualitee - Great Tshirts
SmartGeezer - UK Men's Clothing Blog
Fruit & Veg is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 09-14-2007, 04:23 AM   #2 (permalink)
Contributing Member
 
Fruit & Veg's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 370
iTrader: 2 / 100%
Fruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really nice
OK, ignore the above.

I've been playing around and nothing is working. That page is now setup how I want it. The logo is at the bottom but I want it to be overlayed at the top of the pink nav bar so it lines up. It overlays two divs, plus it needs to remain in the same place for different sized browsers - this is the killer.

Any ideas?
__________________
Individualitee - Great Tshirts
SmartGeezer - UK Men's Clothing Blog
Fruit & Veg is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-16-2007, 05:57 AM   #3 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania (atm)
Posts: 2,846
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
First thing first:
I saw you're using the same ID on multiple divs to identify them (that is to apply styles to them)... This is wrong! Use CSS classes for that. An ID should identify a single element in your page not multiple elements.

Anyway, I've been playing around with your code and I came up with this, so this is how you want it to look like?
Attached Thumbnails
css-relative-positioning-difference-between-ie-ff-ie.jpg  css-relative-positioning-difference-between-ie-ff-ff.jpg  css-relative-positioning-difference-between-ie-ff-ns.jpg  css-relative-positioning-difference-between-ie-ff-opera.jpg  
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-16-2007, 08:20 AM   #4 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 17,964
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
Quote:
Originally Posted by Costin Trifan View Post
First thing first:
I saw you're using the same ID on multiple divs to identify them (that is to apply styles to them)... This is wrong! Use CSS classes for that. An ID should identify a single element in your page not multiple elements.
To add:

ID = single assignment
class = multiple assignments

Not sure if you need a IE positioning hack, but I tend to use this:

margin-bottom: 0px; (all browsers see this)
*margin-bottom: -2px; (only IE sees this and fixes itself)
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-17-2007, 12:47 AM   #5 (permalink)
Contributing Member
 
bratwebdesign's Avatar
 
Join Date: 04-05-06
Location: Nebraska
Posts: 560
iTrader: 0 / 0%
Latest Blog:
None

bratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to beholdbratwebdesign is a splendid one to behold
Send a message via MSN to bratwebdesign
To overlay the logo do this:

Change div#container to this: (I only added position: relative

Code:
div#container { text-align : left; width : 700px; margin : 0 auto; padding : 0; position: relative; }
Then to div#logo: (added position, top and left)

Code:
div#logo { position : absolute; top : -5px; left : 40px; width : 157px; margin : 0; padding : 0; }
I tested this on IE6 and FF2 at different screen resolutions and it worked perfectly. I would change the logo to a gif without the background though.

Hope this helps.
Attached Thumbnails
css-relative-positioning-difference-between-ie-ff-ie.gif  
__________________
Omaha Web Design | Cube Directory

Last edited by bratwebdesign : 09-17-2007 at 12:59 AM.
bratwebdesign is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-17-2007, 04:57 AM   #6 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania (atm)
Posts: 2,846
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
Ok, ignore my post too!

note for myself:
never get involved into these kind of problems anymore
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is truth relative? John Scott Politics 239 02-13-2008 10:51 AM
Relative positioning with CSS lajones3 Coding Forum 4 02-01-2007 04:39 AM
relative ads tytyguy Google Forum 0 08-07-2006 09:15 AM
Relative URL Question realestate Web Design Lobby 4 12-05-2004 04:17 PM
CSS positioning vs. table positioning downtroden Coding Forum 2 07-19-2004 11:40 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 11:24 AM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.