How to put main header on the right of screen

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
mr p
New Member
New Member
Posts: 9
Joined: Mon Jan 01, 2007 10:56 pm

How to put main header on the right of screen

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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?...
mr p
New Member
New Member
Posts: 9
Joined: Mon Jan 01, 2007 10:56 pm

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

Post 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.
Last edited by mr p on Tue Jan 02, 2007 4:34 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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 */
}
mr p
New Member
New Member
Posts: 9
Joined: Mon Jan 01, 2007 10:56 pm

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

Post by mr p »

thankyou sir, that did the trick nicely.

Cheers.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post by Dr.CSS »

Your Welcome...
Post Reply

Return to “Layout and Design (CSS & HTML)”