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 alignment problem

Featured Replies

Hi,

 

I am new to CSS and have been designing a site using a template in my Mac since the last few weeks. As a beginner I didn't realise that I should be checking the site on all other web browsers except Safari, so just found out that Internet Explorer is not liking either the HTML or CSS alignment code I guess. Except the homepage all the other pages seems to look ok, as middle aligned.

 

This is the site link: http://www.infodriveme.co.uk/

 

It would be a great favour if there is anyone to help, and also apologies if you find the HTML & CSS code too messy.

 

Thanks!

IE doesn't like this

<!-- saved from url=(0022)http://internet.e-mail -->

above the doctype. There should be nothing above the doctype.

 

If you want to add comments, add them inside the head or body sections.

 

Your code has 22 errors and 2 warnings if you check here http://validator.w3.org/ , but they don't seem to have affected the display. There are some element tags like <AC6>...</AC6> and <footertextlink>...</footertextlink> which are invalid tags so unless you have some special program that has added them to the DOM, browsers are just ignoring them. JavaScript/jQuery could add them as valid tags, but I haven't checked your javascript closely.

Edited by Wickham

  • Author

@ ELITE Many thanks for the link, it was very helpful. :)

 

 

@ Wickham, I have removed the comment thing on top doctype and yes it is now center aligned. Thanks a million :D

 

Can you please suggest something regarding the element tags like <AC6> and the rest? I mean what tags should I use to make them valid and decorate the fonts, because of SEO I am not using more than one <h1> tag and <h2> tag.

 

Btw as I am a novice in CSS I actually named these tags <AC6><footerlink> etc. it was not generated by JavaScript/jQuery. :fool:

 

Once again many thanks for the help. Cheers!

Edited by Adib

Can you please suggest something regarding the element tags like <AC6> and the rest? I mean what tags should I use to make them valid and decorate the fonts, because of SEO I am not using more than one <h1> tag and <h2> tag.

 

You shouldn't create your own element tags like <AC6>...</AC6> and <footertextlink>...</footertextlink>,

 

You should use an existing element like div or p or h1 and create a class or id like this CSS:-

#AC6 { color: blue; } /*id */
.footertextlink { text-decoration: underline; } /*class*/

HTML markup:-

<div id="AC6">..........content.......</div> <!--id should be used only once on a page-->
<h2 class="footertextlink">.........</h2> <!--class can be used many times-->

 

You can use h2 as often as you like. There are situations where you can use h1 many times on a page, but if you don't want to use h1 more than once, use a p tag with a class which has the same style as the h1, ie same font-size, margin, etc. See

https://developer.mozilla.org/en/Sections_and_Outlines_of_an_HTML5_document

Note: Each section can have its own heading hierarchy. Therefore, even a nested section can have an <h1> .

Edited by Wickham

  • Author

Thanks a lot for clearing my confusion and all the help! :D

I need to get rid off a lot of errors now...

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.