|
|
|
|
Thread title: WHY is my page HUGE in IE8 but Normal in Every Other Browser |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
08-12-2010, 09:13 PM
|
#1
|
Status: I'm new around here
Join date: Aug 2010
Location: Chicago, IL
Expertise: design, web coding
Software: photoshop, illustrator, dw
Posts: 4
|
WHY is my page HUGE in IE8 but Normal in Every Other Browser
This is my second website that I coded using CSS, I felt like things were going well, and then I checked it out on a PC at work running IE8, it's huge,takes up the whole screen.
Also, I have to press compatibility view or it screws up. My code is clean and the site looked normal when checking it on my wife's PC, which was running IE 9.
I created it on a mac, running both Safari and Firefox, and it looks fine there as well. So far, it appears IE 8 is the only browser where it shows up and is ridiculous huge.
Here's the site http://www.christopherdelbert.com
Can anyone help and tell me why/ what I can do ?
|
|
08-12-2010, 09:40 PM
|
#2
|
Status: Senior Member
Join date: Mar 2005
Location: Singapore
Expertise: Web Design, XHTML/CSS
Software: Photoshop, Illustrator
Posts: 861
|
Looks fine in my IE8 (pc) and notebook.
You sure you didn't accidentally magnify your screen? If yes, press CTRL+0 to change it back to normal.
Anyway, there's errors in your codes. You may want to validate it using http://validator.w3.org/.
|
|
08-12-2010, 10:24 PM
|
#3
|
Status: I'm new around here
Join date: Aug 2010
Location: Chicago, IL
Expertise: design, web coding
Software: photoshop, illustrator, dw
Posts: 4
|
Originally Posted by 1901gt
Looks fine in my IE8 (pc) and notebook.
You sure you didn't accidentally magnify your screen? If yes, press CTRL+0 to change it back to normal.
Anyway, there's errors in your codes. You may want to validate it using http://validator.w3.org/.
|
I think it's because my code is in XHTML 1 because thats what my dreamweaver is in. I however used some XHTML 4 stuff, I just refuse to spend more money on dreamweaver since it already does everything I need for now.
|
|
08-13-2010, 12:29 AM
|
#4
|
Status: Member
Join date: Jan 2006
Location: Indiana, USA
Expertise:
Software:
Posts: 419
|
There is no XHTML 4. There's HTML 4 and XHTML, but unless you're using real XHTML, the differences are few and far between. And your code is valid by the way.
I checked it in IE8/Chrome/Firefox and it displays the same in all three. My best guess is your work PC has a lower resolution than what you use at home, making your site appear bigger than normal.
|
|
08-13-2010, 04:57 AM
|
#5
|
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
Posts: 1,187
|
1.) What's the resolution of your work PC's monitor?
2.) What's the resolution of your home PC's monitor?
Displays just fine in latest for (all Win): Chrome, Firefox, Safari, Opera, IE8
|
|
08-13-2010, 01:38 PM
|
#6
|
Status: I'm new around here
Join date: Aug 2010
Location: Chicago, IL
Expertise: design, web coding
Software: photoshop, illustrator, dw
Posts: 4
|
Originally Posted by Matt
There is no XHTML 4. There's HTML 4 and XHTML, but unless you're using real XHTML, the differences are few and far between. And your code is valid by the way.
I checked it in IE8/Chrome/Firefox and it displays the same in all three. My best guess is your work PC has a lower resolution than what you use at home, making your site appear bigger than normal.
|
I went in and fixed a bunch of issues to validate the code in all the pages except one. It appears to display fine. The only issue the confused me is the use of id vs class. I used id's but it wanted me to use class, but it worked anyway... why would it work if it's against validation?
|
|
08-13-2010, 01:46 PM
|
#7
|
Status: Request a custom title
Join date: Apr 2007
Location: UK
Expertise: Code & Programming
Software: Coda, TextMate, Sublime 2
Posts: 2,097
|
You can use a class multiple times within the same document. So say I had a CSS declaration like:
Code:
.floatRight {
float: right;
font-size: 1000000em;
}
You can then use that class (denoted by a .) on as many elements as you like within the document. If it was an id (denoted by a #) you can only use it once (i.e. an id is specific).
If you used an id more than once it would throw a validation error, but would also probably be displayed okay in most browsers.
|
|
08-13-2010, 02:27 PM
|
#8
|
Status: Member
Join date: Jan 2006
Location: Indiana, USA
Expertise:
Software:
Posts: 419
|
Just because your code is invalid doesn't mean it won't display properly. Having valid code, although good practice, is not always necessary. In the end it's up to the browser to interpret your code, not W3C's standards.
And what Gaz said is completely correct. ID's are meant to be unique, whereas classes can be used more than once.
ID = A person's Identification (ID) is unique to one person.
Class = There are many people in a class.
|
|
|
08-13-2010, 06:50 PM
|
#9
|
Status: I'm new around here
Join date: Aug 2010
Location: Chicago, IL
Expertise: design, web coding
Software: photoshop, illustrator, dw
Posts: 4
|
Originally Posted by Matt
Just because your code is invalid doesn't mean it won't display properly. Having valid code, although good practice, is not always necessary. In the end it's up to the browser to interpret your code, not W3C's standards.
And what Gaz said is completely correct. ID's are meant to be unique, whereas classes can be used more than once.
|
I get that much but I don't understand the point of the rule. Why not just always use class' ? -And why would it work if you used it wrong? Doesn't quite make sense to me.
|
|
08-13-2010, 07:33 PM
|
#10
|
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
Posts: 1,187
|
Originally Posted by christopherdelbert
I get that much but I don't understand the point of the rule. Why not just always use class' ? -And why would it work if you used it wrong? Doesn't quite make sense to me.
|
It has to do with the doctype you use with your website.
Available [recommended] doctypes are ( http://www.w3schools.com/tags/tag_DOCTYPE.asp):- HTML 4.01 Strict
- HTML 4.01 Transitional
- HTML 4.01 Frameset
- XHTML 1.0 Strict
- XHTML 1.0 Transitional
- XHTML 1.0 Frameset
- XHTML 1.1
Your website has the following:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
That means when you validate your coding, you are adhering to XHTML 1.0 Transitional doctype.
ID Attribute
In XML, fragment identifiers are of type ID, and there can only be a single attribute of type ID per element. Therefore, in XHTML 1.0 the id attribute is defined to be of type ID.
Class Attribute
This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters.
|
http://www.3point7designs.com/blog/2...lass-and-span/
http://css-tricks.com/the-difference...-id-and-class/
http://www.w3schools.com/tags/tag_div.asp
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|