nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   Software Development (http://www.nvnews.net/vbulletin/forumdisplay.php?f=53)
-   -   Need help with HTML code (http://www.nvnews.net/vbulletin/showthread.php?t=124065)

FastRedPonyCar 12-02-08 04:03 PM

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.


.masthead {width: 1166px; height: 167px;
position: absolute; margin-left: 75px; left: 12%; top: 200px;

And here's what it yields.


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!

jcrox 12-02-08 06:22 PM

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/

t3hl33td4rg0n 03-28-09 04:51 PM

Re: Need help with HTML code
try this maybe?


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



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

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


Bigbuck 03-28-09 05:39 PM

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

All times are GMT -5. The time now is 09:53 PM.

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