DIV Layout Problem (browser related), layout looks different in IE and firefox |
DIV Layout Problem (browser related), layout looks different in IE and firefox |
Jul 23 2006, 01:07 PM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 125 Joined: Jun 2005 Member No: 156,341 |
Ok, my new div layout that I'm working is coming along great except for one small thing. The div's that I used to put text in all look great in IE...their positioning is spot on in my browser at least. In firefox, they're either 1 or 2 pixels off placement or they're too for the area I designed for them. Does anyone know why they look different in two browsers?
|
|
|
|
![]() |
Jul 23 2006, 01:09 PM
Post
#2
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
Post a code to one of your divs. It happens because well it happens.
|
|
|
|
Jul 23 2006, 02:18 PM
Post
#3
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 125 Joined: Jun 2005 Member No: 156,341 |
ok here's an example of one of my divs...first the style sheet part which is in the about me section
.movies{ left:50%; margin-left:-416px; top:-005px; position:absolute; height:155px; width:351px; z-index:2; } then the actual div and it's content <div class="movies"><div style="width: 155px; height: 351px; background-color: transparent; color: FFFFFF; font-family: times new roman; font-size: 12px; text-align: left; overflow: none; padding: 4px;">     I’m what some would call a “movie buff.” I love movies, and I’ve definitely seen my fair share over the years. I’ll basically watch anything as long as the plot interests me. However, horror movies are my favorite films to watch. It doesn't matter if it's a mainstream or even a low-budget film. If it's horror, I'll watch it at least once.<br>     Don't get the impression that I'm all about the blood and guts, though. Some of my favorite films are dramas; The Outsiders, Home Room, Boy's Don't Cry, Rocky, Donnie Darko, The Crow, etc. There's even some romances and comedies that I like too (Titanic, Notebook, American Pie, etc). </div> |
|
|
|
Jul 23 2006, 02:31 PM
Post
#4
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
Try not to use margins and percents. That seems to keep them aligned in both browsers for me.
my myspace. I do this: .divnameofyourchoice{ position: absolute; left: #px; top: #px; width: #px; height: #px; z-index: #; } <div class="divnameofyourchoice"> stuff stuff </div> Try that out for one of yours and see if it aligns the same in both. |
|
|
|
Jul 23 2006, 06:59 PM
Post
#5
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 125 Joined: Jun 2005 Member No: 156,341 |
so basically instead of having it say "margin-left" just delete that and have it say "left" instead...for the position part in the code i mean...for example...
left:100px instead of margin-left:100px ? If so...I'll try your suggestion IF myspace actually ever decides to get my profile back up online. Mine seems to be one of the few that's still down and out. |
|
|
|
Jul 23 2006, 07:39 PM
Post
#6
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
Yea and get rid of left:#%; Get rid of percents and the word margin.
So left:100px; Yes. |
|
|
|
Jul 25 2006, 01:58 AM
Post
#7
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 125 Joined: Jun 2005 Member No: 156,341 |
that didnt work. it's still misaligned in firefox
|
|
|
|
Jul 25 2006, 03:46 AM
Post
#8
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
You know you have to realign it when you change it right?
Post the new code? |
|
|
|
Jul 26 2006, 11:10 AM
Post
#9
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 125 Joined: Jun 2005 Member No: 156,341 |
This first piece is the header that i designed for the page. The first code is what i have in the style tags in the who i'd like to meet. It looks dead on in IE but in fire fox it looks like it's shifted downward more.
.background{ left:189px; top:-001px; position:absolute; height:163px; width:900px; z-index:1; } Then in the who I'd like to meet... <div class="background"><img src="http://i34.photobucket.com/albums/d119/a_forgotten_ghost/Web%20Graphics/resizedtopper2.gif"></div> |
|
|
|
Jul 26 2006, 12:50 PM
Post
#10
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
Because of this:
top:-001px; Use actual numbers. Not 000 something. Just lik e1 , 2, 3, etc. |
|
|
|
Jul 26 2006, 03:54 PM
Post
#11
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 125 Joined: Jun 2005 Member No: 156,341 |
tried that. the add is still out of place on my header. i designed a header that has the open space for the myspace add to show through. and in firefox the add is out of position but in ie..it looks ok. so i give up lol. thanks for your help though.
|
|
|
|
![]() ![]() |