Page 1 of 1

How to put main header on the right of screen

Posted: Mon Jan 01, 2007 11:01 pm
by mr p
Hey there,

I'm just starting to get my head round css and all associated things.  What I am trying to do currently is get the main header to sit on the rhs of the screen, rather than the left.  I'm using a pretty standard (at this stage) Left sidebar + 1 column template and stylesheet.

I've tried lots of things like float: right and so on, with no luck.  If I comment out the -999em text indent I start to have some more success (though not perfect), but then you can see the text that should be hidden under the image.

Anyone know of a simple way to do this?

(don't hit the newbie, please...)

Cheers

Re: How to put main header on the right of screen

Posted: Tue Jan 02, 2007 12:59 am
by Dr.CSS
A link or an image would help, when you say the header you mean the default grey/blue part at the top or the logo image thing?...

Re: How to put main header on the right of screen

Posted: Tue Jan 02, 2007 9:22 am
by mr p
Sorry about that.

see here for what I'm trying to do:

There is no content yet, so there is still the default install.  What I want to do is move the greygum_logo.png to the right hand side of the screen, nothing else.  Essentially just right justify it, as if it were text.

I've tried a lot of things like encasing the whole lot in another div class and treating it all as text, to no avail.

Hopefully that makes more sense.

Cheers.

Re: How to put main header on the right of screen

Posted: Tue Jan 02, 2007 1:53 pm
by Dr.CSS
In the Layout go to the header h1 and change it, add the blue remove the red...

div#header h1 a {
/* you can set your own image here */
  background: white url(uploads/greygum_logo.png) no-repeat right 0 0px;
  display: block;
  height: 39px;            /* adjust according your image size */
  text-indent: -999em;  /*this hides the text */
  text-decoration:none; /* old firefox would have shown underline for the link, this explicitly hides it */
}

Re: How to put main header on the right of screen

Posted: Tue Jan 02, 2007 1:56 pm
by mr p
thankyou sir, that did the trick nicely.

Cheers.

Re: How to put main header on the right of screen

Posted: Tue Jan 02, 2007 2:16 pm
by Dr.CSS
Your Welcome...