Log In · Register

 
 
Closed TopicStart new topic
DIV layout page allignment., in firefox and IE?
vintage-toile
post Apr 7 2008, 03:25 PM
Post #1


Kissing for yesterday.
*****

Group: Official Designer
Posts: 465
Joined: Sep 2007
Member No: 569,813



i've created a new DIV layout for myspace...and it's perfectly alligned in internet explorer, but in firefox, the navigation section is about 200px out of line.
here's the part of the coding which needs to be changed somewhere:
CODE
body {
background-attachment:scroll;
background-color:ef2d8f;
cursor:crosshair;
font-weight:normal;
}

a:link, a:visited, a:active {
font-family:tahoma;
font-size:13px;
font-weight:bold;
color:cecdc9;
text-decoration:none;
}

a:hover {
font-family:tahoma;
font-size:13px;
font-weight:bold;
color:050422;
text-decoration:none;
}

a.nav:link, a.nav:visited, a.nav:active {
text-decoration: none;
    font-family:tahoma;
    font-style: normal;
    font-variant: small-caps;
    font-size: 15px;
    line-height: 20px;
    text-align: center;
    color:FFFFFF!important;
    background-color:330a1e;
    border-left: 10px solid;
    border-color:fcccf8 !important;
    border-right: 10px solid;
    border-color:fcccf8 !important;
    cursor: crosshair;
    display: block;
    margin: 0;
        width: 200px;
    margin-bottom: 0em;
    padding: 0px;
    padding-left: 1px;
    padding-right: 1px;

    }


a.nav:hover {text-decoration: none;
    font-family:tahoma;
    text-align: center;
        font-variant: small-caps;
    font-style:uppercase;
    font-size:18px;
    line-height:20px;
    color:FFFFFF !important;
    background-color:330a1e ;
    border-left: 10px solid;
    border-color:fcccf8 !important;
    border-right: 10px solid;
    border-color:fcccf8 !important;
    cursor: crosshair;
    display: block;
    margin: 0;
        width: 200px;
    margin-bottom: 0em;
    padding: 0px;
    padding-left: 1px;
    padding-right: 1px;}


.header {
position:absolute;
overflow:auto;
top:120px;
left:90px;
background-color:transparent;
border:0px;
}

.navigate {
position:absolute;
overflow:auto;
top:240px;
left:633px;
background-color:transparant;
font-family:times new roman;
font-size:10px;
color:black;
font-weight:normal;
width:300px;
height:200px;
padding:0;
}

.main {
position:absolute;
overflow:auto;
top:665px;
left:120px;
background-color:transparant;
font-family:tahoma;
font-size:12px;
color:FFFFFF;
font-weight:normal;
height:230px;
width:475px;
margin:0;
padding:0;
}


.burnbook {
position:absolute;
overflow:auto;
top:625px;
left:633px;
background-color:transparant;
font-family:tahoma;
font-size:12px;
color:FFFFFF;
font-weight:normal;
height:240px;
width:250px;
margin:0;
padding:0;
}

and it's most likely in the navigation bit...(duhh..)
but i've changed the coding in the navigation to left:50%;
margin-left:000px;
as recommended by insurmountable, and for some reason this has now misaligned the layer to the same amount in IE.

does anyone know how i can solve this? and where to put the new amounts so that the entire layout is alligned in all browsers?
 
S-Majere
post Apr 7 2008, 03:47 PM
Post #2


Addict
*******

Group: Staff Alumni
Posts: 3,918
Joined: Jun 2007
Member No: 538,522



I would really recommend using position: relative; for your DIVs (save for the main banner image which can be absolutely positioned). You should find that using a relative postion when using left:50%;margin-left:350px; should work out quite nicely.
 
vintage-toile
post Apr 7 2008, 03:56 PM
Post #3


Kissing for yesterday.
*****

Group: Official Designer
Posts: 465
Joined: Sep 2007
Member No: 569,813



i have tried this, however the layers with a relative position completely disappeared sad.gif
 
S-Majere
post Apr 7 2008, 04:34 PM
Post #4


Addict
*******

Group: Staff Alumni
Posts: 3,918
Joined: Jun 2007
Member No: 538,522



Either your pixel positions are completely out or perhaps your Z-Index is too low. I'll actually try to give this code a mess-around with tomorrow if I have time and see if I can align it for you. It would be really helpful if you could give me the full code so I know what I'm working with (you can PM me with it if you'd prefer).
 
vintage-toile
post Apr 7 2008, 06:23 PM
Post #5


Kissing for yesterday.
*****

Group: Official Designer
Posts: 465
Joined: Sep 2007
Member No: 569,813



i think it's the z-index.
i was just wondering really if there was any almost fixed idea for everything to be aligned in all version of explorers, firefox is always one to annoy me with navigation shifty.gif
thankyou very much for the offer, but i know how time consuming it is and this layout was just for a friend, she'll probably move onto another one soon and i'd hate your hard work wasted, it takes a lot of though.
but thanks _smile.gif
 
S-Majere
post Apr 8 2008, 07:04 AM
Post #6


Addict
*******

Group: Staff Alumni
Posts: 3,918
Joined: Jun 2007
Member No: 538,522



I really don't mind helping out, layouting is my vice wink.gif

There is a surefire way of aligning a layout dead center in all browsers, all resolutions - usually by using the relative position with the 50 percent and minus pixel values.

If you do want a little further help with this, by all means let me know!

 
vintage-toile
post Apr 8 2008, 07:51 AM
Post #7


Kissing for yesterday.
*****

Group: Official Designer
Posts: 465
Joined: Sep 2007
Member No: 569,813



thankyou ever so much biggrin.gif
i managed to fix it in the end and the layout got accepted on CB as well, so it was a good outcome.
thanks for offering though.
 
S-Majere
post Apr 8 2008, 07:57 AM
Post #8


Addict
*******

Group: Staff Alumni
Posts: 3,918
Joined: Jun 2007
Member No: 538,522



Awesome - glad you got it sorted! I'll moosey over and take a look in a moment. wink.gif

Topic Closed.
 

Closed TopicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: