Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-02-08, 05:03 PM   #1
FastRedPonyCar
Resident Tire Destroyer
 
FastRedPonyCar's Avatar
 
Join Date: Aug 2004
Location: Montgomery, AL
Posts: 3,012
Send a message via AIM to FastRedPonyCar
Default Need help with HTML code

I'm trying to get the masthead image of our myspace page centered up and the code I've got doesn't take different monitor sizes and resolution into proportional considerations.

for example, here's the masthead code I'm using.

Code:
.masthead {width: 1166px; height: 167px;
position: absolute; margin-left: 75px; left: 12%; top: 200px;
background-image:url(http://img.photobucket.com/albums/v212/fastredponycar/ChromeHeartBigLogo.png);}
And here's what it yields.

www.myspace.com/chromeheartband

now, that big chromeheart logo is perfectly centered on my 22" widescreen but not on a regular view ratio monitor or at a different resolution.

Is there coding that I can use to keep it centered up with equal padding on each side regardless of monitor resoulution or size/shape?

If so, what do I need to change? thanks!
__________________
- Desktop -
4770k @ 4.45 ghz - ASUS Gryphon Mobo - 16 gigs Corsair Vengeance Pro 1866 RAM - XSPC Rasa 750 RS240 H2o Cooling - EVGA GTX 680 @1325mhz - 128 gig Crucial RealSSD C300 - 150 gig Velociraptor +2.75 Terrabytes of WD Sata 3.0 storage - 910 watt PC P&C PSU - Corsair Obsidian 650D case

- Server -
Core I7 D0 revision 920 @ 3.75 ghz - ASUS P6T Deluxe - 12 Gigs Mushkin DDR3 1600 - Corsair HX 620 PSU - Noctua NH-U9B cooler - Coolermaster WaveMaster Case

- Laptop -
MSI 16F2-012
- i7 2630QM - GTX570m @ 750Mhz - 8 gigs HyperX 1866 - 120 gig OCZ Vertex 3 SSD- 750 gig Scorpio Black - BluRay - 95% Gamut Screen - IC Diamond goop
FastRedPonyCar is offline   Reply With Quote
Old 12-02-08, 07:22 PM   #2
jcrox
Mahna Mahna
 
jcrox's Avatar
 
Join Date: Jul 2006
Location: Madison, Wi
Posts: 6,134
Default Re: Need help with HTML code

I've done it with JavaScript before... I'll see if I can find the code for that.

Edit: see if this helps: http://particletree.com/features/dyn...ndent-layouts/
__________________

Gaming

MSI MPower Z87 | 4770k | CNPS9900MAX-B | 8GB G.Skill 1866 | EVGA GTX760 |ThermalTake 850w | X-Fi Titanium | HAF | Asus PA248Q | Lycosa | Death Adder | Win8 Pro 64

Dev/Backup

MSI GD65 | 2500k | H50 | 8GB G.skill | GTX570 | Ubuntu 13.10

Laptop

17" Inspiron | i5 | 4GB DDR3 | 500GB HDD | Win7 Pro 64

jcrox is offline   Reply With Quote
Old 03-28-09, 05:51 PM   #3
t3hl33td4rg0n
Dethklok Returns!
 
t3hl33td4rg0n's Avatar
 
Join Date: Dec 2004
Location: Kent, OH
Posts: 2,142
Send a message via AIM to t3hl33td4rg0n Send a message via MSN to t3hl33td4rg0n Send a message via Yahoo to t3hl33td4rg0n
Default Re: Need help with HTML code

try this maybe?

Code:
.masthead {
  width: 100%;
  height: 167px;
  position: absolute; 
  left: 0px; 
  top: 200px;
  text-align: center; /* Doesn't Always Work */
}
then

Code:
<div class="masthead" align="center"><img src="http://img.photobucket.com/albums/v212/fastredponycar/ChromeHeartBigLogo.png" /></div>

Edit: Works fine... Keeps it centered everytime...

http://ngzroot.ath.cx:9999/masthead.html
__________________


Intel QX9650 @ 3.83GHzXFX 780ieVGA GTX 560Ti8GB GSkill DDR800Creative Sound Blaster X-Fi Titanium PCI-ESeagate 1.5TB . 4x Samsung 2TB

Quote:
Originally Posted by MowTin View Post
....it's so clear how government makes things worse not better...

Last edited by t3hl33td4rg0n; 03-28-09 at 06:00 PM. Reason: Addition
t3hl33td4rg0n is offline   Reply With Quote
Old 03-28-09, 06:39 PM   #4
Bigbuck
Registered User
 
Join Date: Mar 2009
Location: Wisconsin
Posts: 316
Send a message via MSN to Bigbuck
Default Re: Need help with HTML code

If you get rid of the div have this:

.masthead {
display: block;
margin-left: auto;
margin-right: auto;
}

<img class="masthead" src="http://img.photobucket.com/albums/v212/fastredponycar/ChromeHeartBigLogo.png">
Bigbuck is offline   Reply With Quote
Reply


Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora could seek Microsoft code signing to contend with secure boot News Archived News Items 0 06-03-12 05:10 PM
Learn to Code With Mozilla's 'Thimble' Editor News Archived News Items 0 05-29-12 09:40 PM
A look inside Code for America News Archived News Items 0 05-28-12 01:00 PM
Ask Stack: How can you review your own code? News Archived News Items 0 05-12-12 01:00 PM
Code in your own emoticons Kruno Feedback Forum 2 07-30-02 02:40 AM

All times are GMT -5. The time now is 01:42 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.