Jump to content

How can almost identical css cause such big changes?


capnhud

Recommended Posts

I was noticing as a trying to develop this web page that I had in the style sheet what I thought was exactly the same as what I had in a duplicate style sheet. But upon close examination I noticed that one selector was different but was achieving the same result.

 

the selector in question is this page

 

#header {

height: 110px

}

 

 

and on this page

#header {

height: 120px;

margin: 0 0 5px;

}

 

if you try to make the 120 pixel page equal the 110px page it breaks and I was just wondering why? Everything else is the exact same.

Edited by capnhud
Link to comment
Share on other sites

The second page has a #header div height of 125px (120px plus bottom 5px margin as three sizes means top, each side, bottom). A page often breaks when you increase the size of a div and sometimes even if you reduce the size of a div.

Link to comment
Share on other sites

I would suggest getting rid of that character (text) at the upper left corner first because that certainly does push the header down a bit.

 

I noticed that but I could only assume that was from using

 

But even changing to jquery-1.3.2.min.js it is still there.

Edited by capnhud
Link to comment
Share on other sites

two of us are trying to help, I hope we aren't confusing you.

 

Your html page appears top have been saved as utf-8 and this causes a byte-order mark at the top left corner of a page. Save your html pages as encoding ANSI to avoid this. There are three boxes whern you save a file, the filename, the type (html) and encoding which most people don't check.

Link to comment
Share on other sites

No am not getting confused I was only trying get to the heart of the matter as to why this was happening and now I see that the script tag because I had them indented I just backspaced them back and once I did that and reuploaded the page promptly broke using 110px. I just dont get why I could not see that as a problem. Or maybe just using Autokey has some risk. Aptana how do you specify the encodings when you save a page? If you know by chance.

 

I found how to set the encodings thanks once again for heads up.

Edited by capnhud
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...