Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   Any CSS experts? 'Simple' question on header tags (http://www.greenguysboard.com/board/showthread.php?t=40045)

HowlingWulf 2007-05-02 09:22 PM

Any CSS experts? 'Simple' question on header tags
 
Ahhhhh my eyes burn from searching the web for help.

I want to have the very top of my page have this centered:
HEADER ONE - HEADER TWO

with of course header one the

and header two the

.
I'll have an image underneath it and I want no padding in between the header text and the image. Thats it. Hope it makes sense.


DangerDave 2007-05-02 10:07 PM

HW, is this what you are looking for...


Code:


?

DD

Preacher 2007-05-02 11:54 PM

Dave is correct on the diplay type, but you had other needs and with just changing the display type your image will be on the same line as your headers.

Wrap those headers in a div like so

HTML Code:


<div id="centerme"><h1>xxx</h1><h2>yyy</h2></div>

Another reason you should wrap those headers in a div, is because changing the display type to inline will now force the size of the header tags to be the actual width of the text, so adding a text-align of center to the headers won't align them correctly.

HTML Code:


h1, h2 {display: inline; margin-bottom: 0;}
div#centerme {text-align: center;}

Make sure your image is not in that div. Then just center your image as you normally would on the next line. I wouldn't recommend css for that unless you know what you are doing because FF & IE render differently. |thumb

HowlingWulf 2007-05-03 11:22 AM

thanks guys the inline was what I needed! I knew this was the right place to ask. :D


All times are GMT -4. The time now is 03:14 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc