Jump to content

CSS positioning question


803andy

Recommended Posts

I don't know the correct term, but here I go.......

 

How do I position selected text to go in a desired position as in the image below:

 

http://img837.imageshack.us/img837/4555/maintext.jpg

 

The image attached is the exact image I will be using, but I want to swap the Text Here text with selectable text of my own using CSS.

 

I will appreciate any assistance.

Link to comment
Share on other sites

I would use a div to contain it and apply the dark gray background to the div. So, something like this:

 

#somenamethatmakessense {

width:

height:

margin:

padding:

}

 

Does that help? If you need more information, just holler. Do you have any of this coded yet so we can see what you have so far?

Link to comment
Share on other sites

  • 2 weeks later...

I've changed the html for that area like this:

 

<div class="main_text"><img border="0">
<h2>TEXT HERE TEXT HERE TEXT HERE</h2>
<p>Main text, main text, main text
Main text, main text, main text
Main text, main text, main text
Main text, main text, main text
Main text, main text, main text
Main text, main text, main text
Main text, main text, main text</p>
</div>

I removed the <br>s - they are line breaks and not meant to be used to create space. For your text here line, I picked the h2 tag, but you can use whatever - and here is the CSS for it:

.main_text p {
margin-top: 100px;
}
.main_text h2 {
font-size: 80%;
background: #333333;
color: #fefefe;
margin-left: 150px;
margin-top: 40px;
padding: 10px;	
}

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...