Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Internet Explorer won't show header styles xhtml

Featured Replies

Hi hi.

As above i'm having problems with internet explorer and headers defines in css. The script is xhtml, and this is only effecting some of the header styles.

#header h7 {
float: left;
padding: 50px 0 0 10px;
font-size: 43px;
text-transform: none;
color: #FF0066;
}
#header h8 {
float: left;
padding: 50px 0 0 0px;
font-size: 43px;
color:	#0066FF;
}

 

Any ideas? If this were HTML5 i'd understand ..

That CSS looks fine. It's probably something to do with your HTML or layout.

 

Can you post a link to the site so we can see the code (...and how you've managed to get down to H8 tags just in the header!)?

  • Author

That CSS looks fine. It's probably something to do with your HTML or layout.

 

Can you post a link to the site so we can see the code (...and how you've managed to get down to H8 tags just in the header!)?

 

Lol... it's actually where i was changing styles over.. i think there's a header22 somewhere ... www.**********.co.uk.. thank you for your help!

Edited by affmark

Basically, H7 and H8 tags don't exist. The W3 spec for heading only goes up to H6. Most browsers are smart enough to work out what it should be and render the tags, but IE is sticking to the rules so doesn't recognise them.

 

You might be able to change your DOCTYPE from Strict to either Transitional or Loose to get them to display in IE, but it would be better to replace the tags completely, eg:

 

<h1>Jessey<span class="blue">Lees</span><span class="white">.co.uk</span></h1>

  • Author

Basically, H7 and H8 tags don't exist. The W3 spec for heading only goes up to H6. Most browsers are smart enough to work out what it should be and render the tags, but IE is sticking to the rules so doesn't recognise them.

 

You might be able to change your DOCTYPE from Strict to either Transitional or Loose to get them to display in IE, but it would be better to replace the tags completely, eg:

 

<h1>Jessey<span class="blue">Lees</span><span class="white">.co.uk</span></h1>

 

 

Great, thanks. I tried changing it over to transitional and that didn't make much difference. I've just moved some of the css to fit h1-h6. Thank you for your help! (Y)

If you want more than six h elements, choose one between h1 and h6 that is nearly what you want, with the correct ranking, then add a class:-

CSS

.h7 { color: red; }
.h8 { background: blue; }

HTML markup:-

<h3 class="h7">..........</h3>
<h4 class="h8">..........</h4>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.