Jump to content

Use of <span>


williamrouse

Recommended Posts

You might need to clarify what you mean when you say you want to "maintain the flow." I'm not sure how/why you would use a tag in that way... That isn't how it's supposed to be used. A span tag is similar to a div, except that it displays inline, rather than block (which forces elements within it down to a new line). http://www.w3schools.com/TAGS/tag_span.asp

http://www.w3schools.com/css/pr_class_display.asp

 

The only way to move the h1 above the image is to move the code, so that the h1 is above the image within the code, or to use absolute positioning on the h1 to move it into position (which I wouldn't recommend).

Link to comment
Share on other sites

If you are wanting to have the h1 to the right of the image, you'd need to do that by floating either the image (floating the image left) or the h1 (floating it right), or floating both left. Both the h1 and the image use display:block, so they are going to display on their own lines unless you change that by floating them or using absolute/relative positioning.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...