-
AuthorPosts
-
November 19, 2011 at 1:54 am #170846
Hello,
On Joomla 1.7 and JA T3 blank template I am trying to add a background image to a text header; in layout.css (local theme):
#ja-header {height: 241; width: 980px; margin: 10px; background-image:url(‘/images/nhatrang-river.jpg’); text-align:center;}.
Two problems: The text will not be center aligned and the background image height is cut in half.
What am I missing?
Thankskhoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
November 19, 2011 at 2:20 am #425351Hi,
Could you give me a link to your page as you said?November 19, 2011 at 3:54 am #425356Hello,
here is the link to a barely born site: http://nhatrang-beach.info/index.phpkhoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
November 19, 2011 at 4:32 am #425357the background image height is cut in half.
You replace the code in layout.css
#ja-header {
height: 241;
width: 980px;
margin: 10px;
background-image: url('/images/nhatrang-river.jpg');
text-align: center;
}
with
#ja-header {
height: 241px;
width: 980px;
margin: 10px;
background-image: url('/images/nhatrang-river.jpg');
text-align: center;
}The text will not be center aligned
– You add this code into /templates/your_template/css/template.css
#ja-header .logo-text {
float: none;
}November 19, 2011 at 9:50 am #425386Hi, What a dumb error… I can hear the computer whispering: 241 what? Donuts? rabbits?lightyears? Yet there remains a problem: A pixel wide white line across the length of the image at the exact same location where it was cut off before fixing the ‘px’ mistake. (Of course I just plain forgot to type the measurement unit, but I had tried to omit the image size altogether and the image ‘should’ have shown entirely which it did not); there must be something beside the px bug, some inherited rule … ???
Centering is ok now. Thanks a lot.khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
November 19, 2011 at 10:32 am #425389You remove this code from /templates/your_template/css/template.css
#ja-header .main {
border-bottom: 1px solid #CCC;
}November 20, 2011 at 2:19 am #425441Hi Khoand,
Thanks so much for your help. The header is ok now but, for future readers of the thread I must add that there is no “#ja-header .main {
border-bottom: 1px solid #CCC;}” rule in template.css; at least not in the local theme I cloned from the default in blank template. So I added a “border:none” rule which did the trick; your solution was a close guess. Thanks again: have a nice day. -
AuthorPosts
This topic contains 7 replies, has 2 voices, and was last updated by jmll 12 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum