Jump to content

Nocturna

Members
  • Posts

    2
  • Joined

  • Last visited

About Nocturna

  • Birthday 01/26/1987

Previous Fields

  • Languages
    HTML, CSS

Profile Information

  • Gender
    Male
  • Location
    Dublin

Nocturna's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I took out the <base> element (I had understood that it was needed to retrieve images) and used the text-align and the website seems to be working well now. Thanks!
  2. Hello, I'm having an issue centering images on my site and was hoping someone could help. I'm trying to center an image on my site (it's the only content at the moment) and can do so on an internal stylesheet in the HTML code but not in an external stylesheet. I'm certain that it's not an issue with the HTML finding the external sheet as the body "background-color" does work. Below is the coding I's using: Internal Stylesheet (background colour is there and image is centered): <!DOCTYPE html><html><head><base href="http://www.website.com/images/"><base target="_blank"><title>website</title><style type="text/css"> body {background-color:#d8d8d8;} img.center { display:block; margin-left:auto; margin-right:auto; }</style> </head><body><img class="center" src="comingsoon.png" alt="Coming Soon..." width="800" height="600"> </body></html> External Stylesheet (background colour is there but image is not centered): HTML: <!DOCTYPE html><html><head><base href="http://www.website.com/images/"><base target="_blank"><title>website</title><link rel="stylesheet" type="text/css" href="/stylesheets/cssmain.css"> </head><body><img class="center" src="comingsoon.png" alt="Coming Soon..." width="800" height="600"> </body></html> CSS: body {background-color:#d8d8d8;}img.center { display:block; margin-left:auto; margin-right:auto;}
×
×
  • Create New...