ReptiGuy Posted December 2, 2008 Share Posted December 2, 2008 I am trying to put a title above each of my pictures so I am using the <h1> tags and it is working great except for the top picture.When I used the <h1> tags on the top picture it lifted the red area up and there was a blue space in between the red and white area. To fix this I switched the <h1> tags to span tags and on the css sheet I put font-size: 2em; and font-weight: bold; and this made it look like it was in the <h1> tags but it put the title beside the picture.How do I make it so the title is above the picture?You can see what happened here: http://mymanager.site40.net/spanishproject.html Link to comment Share on other sites More sharing options...
rzea Posted December 2, 2008 Share Posted December 2, 2008 Check for a <p> tag, maybe the picture would be inside a paragraph.But if this is not the case, why don't you make your page with the error so we can see what you're saying.Just by placing the H1, a <br /> and then the picture would be enough. Link to comment Share on other sites More sharing options...
elementalgrace Posted December 2, 2008 Share Posted December 2, 2008 **EDIT - just reread your post.Span is inline style. Try adding: span#nospace{display:block;} to your CSS and see what happens. Although, that is a quick workaround. You'd be better off finding out what's happening to your top H1 tag and styling that properly. Link to comment Share on other sites More sharing options...
Jerry62704 Posted December 2, 2008 Share Posted December 2, 2008 I am trying to put a title above each of my pictures so I am using the <h1> tags and it is working great except for the top picture.When I used the <h1> tags on the top picture it lifted the red area up and there was a blue space in between the red and white area. To fix this I switched the <h1> tags to span tags and on the css sheet I put font-size: 2em; and font-weight: bold; and this made it look like it was in the <h1> tags but it put the title beside the picture.How do I make it so the title is above the picture?You can see what happened here: http://mymanager.site40.net/spanishproject.html Don't use <h1> - it's purpose is to give the major definition/description/title for the page. <span> is for inline styling (inline in this case is within a line) and not the right choice either. What I would do is have a <div> that contained the title and the image floated next to the rest of the images. If you need help, let me know. Link to comment Share on other sites More sharing options...
webflex Posted December 2, 2008 Share Posted December 2, 2008 Hi,I also agree with our friend Jerry62704, you have to concentrate in semantic code, you have a tag for X function, another for another function, more and more..Complements,webflex Link to comment Share on other sites More sharing options...
Mistabeo Posted December 4, 2008 Share Posted December 4, 2008 Can you show your CSS style sheet? At least the part that shows how you've styled the picture/title that is broken and one or more that work correctly. And now that I've seen your site, I think I was correct in recommending H1 for the school name. While the others are correct that multiple h1 tags is a semantic nono, another level of H tag would not be inappropriate for the words over your pictures. Perhaps h2 or h3.Anyway, seeing the CSS would help determine what you need to add or remove to get your words over your picture.EDIT: I got an addon that let me see your CSS.I made this change and everything looked kosher. .background2 { background-color: #fff; border: medium solid; border-top: none; text-align: center; padding: 20px;} <h2>Clase De Matemáticas</h2> <image src="http://i289.photobucket.com/albums/ll216/Reptile_Guy_Mr_Nick/mymanager/mathsymbols.jpg?t=1227820242" id="math"/> <hr> I also changed your other <h1> tags to <h2> tags to continue the flow. you can add styles to <h2> to change the size, color, etc of the font if you are not satisfied with how it looks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.