0

http://codepen.io/anon/pen/Gxbfu <-- Here is the bits of the site I'm trying to align.

What I'm trying to achieve, is Onyx Design to align with the right side of the navbar, or navbar to scale to the end of "Onyx Design".

The text is not related to the navbar, unless uncle is a term used for div relations.

jQuery/JS IS an option, as I will have that on the site when I get to making it functional.

Here's what I want to make it look like http://puu.sh/5cq82.png

Divs that matter;

.titling contains the header, and has the border-top and border-bottom .bottomheader contains .navbar (the white strip with icons on) and the heart button.

4

2 回答 2

0

如果您不知道导航栏有多长,您可以使用一些 javascript(使用 jquery)来设置宽度:

$(function(){

   var h1 = $('.titling>h1');
   var navbar = $('.navbar');      
   h1.css({width: (navbar.width() + 'px'), 'text-align':'right'});  

});

分叉:http : //codepen.io/anon/pen/jxrDF

于 2013-11-08T19:52:50.980 回答
0

我刚刚使用了这段代码:

h1
  max-width 300px
  width 300px
  text-align right

可能不是最好的,但适合您的需求。

小提琴:http ://codepen.io/anon/pen/phAHc

于 2013-11-08T19:45:25.287 回答