Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 9, 2012, 04:36 PM   #1
thinkpatience
macrumors member
 
Join Date: Jun 2009
This is frustrating me... How do I Center text between two images?

Hi all, this is frustrating me... so essentially I have a website that looks like this:


----- Subtitle Text -----

"" is my logo
"-----" Are the two images (which are lines).
Subtitle text is obviously text.

Why is this so difficult?
Here's the HTML

Code:
 <div>
     <a href="#">
     <img class="logo" src="#" alt="..."/></a>
 </div>
 <div class="subtitle">
     <img src="#" width="60" height="1" alt="..."/>
     <h1>subtitle text</h1>
     <img src="#" width="60" height="1" alt="..."/>
 </div>
Any help would be greatly appreciated
thinkpatience is offline   0 Reply With Quote
Old Oct 9, 2012, 04:51 PM   #2
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
The h1 tag is a block element so it's going to add a newline before and after itself, which causes it to not be inline with the surrounding images.

You didn't supply any CSS you're trying. For the h1 you can do,

Code:
.subtitle h1 {
 display: inline;
}
This might be enough depending on your existing CSS. The divs will need a text-align:center; on them.
angelwatt is offline   0 Reply With Quote
Old Oct 9, 2012, 05:08 PM   #3
thinkpatience
Thread Starter
macrumors member
 
Join Date: Jun 2009
Ahh, I forgot h1 was a block element, duh ::facepalm:: I'll give it a shot and update, thanks!
thinkpatience is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Larger text not on Notification Center mjsla iOS 7 1 Mar 11, 2014 02:04 PM
How to use CoreText to draw text around images straber iPhone/iPad Programming 1 Mar 3, 2014 01:37 PM
Very Odd Behavior with text and images grey38 MacBook Pro 1 Sep 2, 2013 04:00 PM
App that converts images with text in actuall text rrares1996 iPhone and iPod touch Apps 0 Jul 23, 2013 06:59 PM
Adding Images to Text Edit Huntn Mac Applications and Mac App Store 5 Mar 20, 2013 11:05 AM

Forum Jump

All times are GMT -5. The time now is 09:04 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC