5 Replies - 1442 Views - Last Post: 20 November 2011 - 10:59 PM

#1 iheartbreakz  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 196
  • Joined: 27-April 11

move text in middle

Posted 17 November 2011 - 01:12 PM

Posted Image

how can i move the text abit higher so the image comes in the middle and it looks better
Is This A Good Question/Topic? 0
  • +

Replies To: move text in middle

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,963
  • Joined: 08-June 10

Re: move text in middle

Posted 17 November 2011 - 01:28 PM

Hard to say without seeing the code. Could just be a matter of playing with the vertical-align style, or under other circumstances the text margins.
Was This Post Helpful? 0
  • +
  • -

#3 iheartbreakz  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 196
  • Joined: 27-April 11

Re: move text in middle

Posted 17 November 2011 - 01:35 PM

for CSS i used this:

.notices {
    background: #FFF6BF;
    color: #817134;
    border-color: #FFD324;
}

.success {

  background: #E6EFC2;
  color: #529214;
  border-color: #C6D880;
}

.error {
  background: #FBE3E4; 
  color: #D12F19; 
  border-color: #FBC2C4;
}



for the HTML part i used this:
<div class="error"><img src="./img/error.png">You are not logged in. You Will Be Redirected To Login Page In 5 Seconds.</div>

Was This Post Helpful? 0
  • +
  • -

#4 cupidvogel  Icon User is offline

  • D.I.C Addict

Reputation: 31
  • View blog
  • Posts: 593
  • Joined: 25-November 10

Re: move text in middle

Posted 20 November 2011 - 10:36 PM

Put the text To select more than...button inside a span, apply relative positioning to the span, and assign its top attribute a value (you can find the value needed by trial and error) so that it's aligned with the image on its left.
Was This Post Helpful? 1
  • +
  • -

#5 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1359
  • View blog
  • Posts: 3,424
  • Joined: 28-November 09

Re: move text in middle

Posted 20 November 2011 - 10:54 PM

You'd need to go text-align:center; for the initial centering, and adjust the padding (space inside the border on the box model) to accommodate your needs.
Was This Post Helpful? 1
  • +
  • -

#6 cupidvogel  Icon User is offline

  • D.I.C Addict

Reputation: 31
  • View blog
  • Posts: 593
  • Joined: 25-November 10

Re: move text in middle

Posted 20 November 2011 - 10:59 PM

No, I think in this case, it would need relative positioning on both left and top to achieve the effect, coz the image would not let proper text aligning to take place.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1