Web Layout
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsWeb DesignWeb Layout

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 7th, 2009, 07:54 PM
lestblight lestblight is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 2 lestblight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 18 sec
Reputation Power: 0
Need help with centering my div overlay

Hi.

im creating my myspace music band page and have no prior knowledge of css/html

im hoping you can help me out.

im creating a div overlay to put in my page with some graphic

but the graphic doesnt seem to center itself on different sized monitors.

this is my site myspace.com/redheathers

this is the code im using for my div overlay
thanks much !


<div class="masthead"><span></span></div>

<style>
body {margin-top: 700px; }
</style>

<style>
.masthead {width: 920px; height: 540px;
position: absolute; margin-left: 35px; left: 0%; top: 10px;
background-image:url(linkhere);}

</style>

Reply With Quote
  #2  
Old February 8th, 2009, 07:19 PM
supportresort supportresort is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2009
Posts: 7 supportresort User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 9 m 45 sec
Reputation Power: 0
You could try the following:

* Add align="center" to your DIV tag; or

* Update your .masthead definition to include:

margin-left: auto;
margin-right: auto;

Using 'auto' for your left and right margins results in the values being equal (thus centering the content on your page).

Reply With Quote
  #3  
Old February 8th, 2009, 07:34 PM
lestblight lestblight is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 2 lestblight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 18 sec
Reputation Power: 0
thank you so much
whcih way would you recommend?

can you show me how i would update my code?

thic coding business scares me.. im used to dealing music production not css!

thanks so much .. and im sorry for asking yout o spell it out for me.

patrick

Reply With Quote
  #4  
Old February 8th, 2009, 07:50 PM
supportresort supportresort is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2009
Posts: 7 supportresort User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 9 m 45 sec
Reputation Power: 0
If you update the '.masthead' CSS definition (the second option mentioned) then the centering will be applied to all instances of '.masthead'.

I would suggest that you start by simply updating the DIV tag:

<div class="masthead" align="center"><span></span></div>

You would also need to remove any of the CSS definitions that relate to positioning for .masthead. The new definition could look as follows:

.masthead {
width: 920px;
height: 540px;
background-image:url(linkhere);
}

You could consider removing the width and height definitions too. If you apply the changes gradually though then you can assess the results of each change and find the format that suits you best.

Reply With Quote
Reply

Viewing: ASP Free ForumsWeb DesignWeb Layout > Need help with centering my div overlay


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
Stay green...Green IT