Jump to content
MakeWebGames

Issues with DIV


PHPDevil

Recommended Posts

Hey guys i'm having a problem with some of my positioning.

I've made a container for my web design to go into using a div and the code for it is.

 

div.centered{
  text-align: left; 
  margin: 0 auto; 
  width: 800px; 
  border: 1px solid white; 
 }

 

now ive placed a banner in the div tag.

 

<div class="centered">
<div class="banner">
<img src="logo.png" />
</div>
</div>

 

for me to position the image where i wanted i made another class however there is a issue with it working though.

the code which i have at the momment is.

 

div.banner {
top:35px;
}

 

that doesn't do anything to the image. So i added in position:absolute;

that does change the image to where i want it however it takes the image outside the DIV container where as i want it to stay there.

Any suggestions on what to do?

Thanks

Link to comment
Share on other sites

  • 6 months later...
The <div> tag defines a division or a section in an HTML document.

The <div> tag is used to group block-elements to format them with CSS.

<div style="color:#0000FF">

<h3>This is a heading</h3>

<p>This is a paragraph.</p>

</div>

This is a pretty dated post you've brought back up.

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.

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.

×
×
  • Create New...